Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestTWF tokyo test fixes #214

Merged
merged 4 commits into from
Jul 8, 2013
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions XMLHttpRequest/abort-after-receive.htm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>XMLHttpRequest: abort() after successful receive should not fire "abort" event</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-abort()-method" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-abort()-method" data-tested-assertations="following::ol[1]/li[4] following::ol[1]/li[5]"/>
</head>
<body>
<div id="log"></div>
Expand All @@ -22,7 +22,9 @@

assert_equals(client.readyState, 0);

test.done();
setTimeout(function(){ // use a timeout to catch any implementation that might queue an abort event for later - just in case
test.step(function(){test.done();});
}, 200);
}
});

Expand Down
7 changes: 5 additions & 2 deletions XMLHttpRequest/abort-after-timeout.htm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<title>XMLHttpRequest: abort() after a timeout should not fire "abort" event</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-abort()-method" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-abort()-method" data-tested-assertations="following::ol[1]/li[4] following::ol[1]/li[5]"/>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-timeout-attribute" data-tested-assertations="following::ol[1]/li[2]"/>
</head>
<body>
<div id="log"></div>
Expand All @@ -29,7 +30,9 @@

// abort should not cause the "abort" event to fire

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure you want to drop this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be retained as this test case tests abort() after timeout. One suggestion is the code can be aligned with abort-after-receive.htm as timeout request error is supposed to fire readyState == DONE event.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Sorry :-o

client.abort();
setTimeout(function(){ // use a timeout to catch any implementation that might queue an abort event for later - just in case
test.step(function(){test.done();});
}, 200);

assert_equals(client.readyState, 0);

Expand Down
6 changes: 4 additions & 2 deletions XMLHttpRequest/event-readystatechange-loaded.htm
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>XMLHttpRequest: the LOADED state change should only happen once</title>
<title>XMLHttpRequest: the LOADING state change should only happen once</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method">
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" data-tested-assertations="following::ol[1]/li[10]/dt[1]">
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#infrastructure-for-the-send()-method" data-tested-assertations="following::dt[7] following::a[contains(@href,'#switch-loading')]/..">
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#switch-loading" data-tested-assertations="following::ol[1]/li[1] following::ol[1]/li[2]">
</head>

<div id="log"></div>
Expand Down
2 changes: 1 addition & 1 deletion XMLHttpRequest/response-data-gzip.htm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>XMLHttpRequest: GZIP response was correctly inflated</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" />
<link rel="help" href="https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" data-tested-assertations="following::p[contains(text(),'content-encodings')]" />
</head>
<body>
<div id="log"></div>
Expand Down
3 changes: 2 additions & 1 deletion XMLHttpRequest/response-data-progress.htm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<title>XMLHttpRequest: progress events grow response body size</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method">
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" data-tested-assertations="following::a[contains(@href,'#make-progress-notifications')]/.. following::a[contains(@href,'#make-progress-notifications')]/../following:p[1]" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#make-progress-notifications" data-tested-assertations=".." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#handler-xhr-onprogress" data-tested-assertations="/../.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#event-xhr-progress" data-tested-assertations="/../.." />
</head>
Expand Down