Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: LayoutTests/http/tests/xmlhttprequest/ontimeout-event-override.html

Issue 273993002: Allow XHR timeout attribute to be overridden after send(), per spec (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/xmlhttprequest/ontimeout-event-override.html
diff --git a/LayoutTests/http/tests/xmlhttprequest/ontimeout-event.html b/LayoutTests/http/tests/xmlhttprequest/ontimeout-event-override.html
similarity index 88%
copy from LayoutTests/http/tests/xmlhttprequest/ontimeout-event.html
copy to LayoutTests/http/tests/xmlhttprequest/ontimeout-event-override.html
index 23d1e0474ac3999b5604fc2af961b31f098d1761..43dd21e7b8c904d20bd60f1745a32fdd14e01f38 100644
--- a/LayoutTests/http/tests/xmlhttprequest/ontimeout-event.html
+++ b/LayoutTests/http/tests/xmlhttprequest/ontimeout-event-override.html
@@ -37,9 +37,13 @@ testOnTimeoutEvent.step(function () {
xhr.onabort = testOnTimeoutEvent.step_func(unexpectedProgressEvent);
xhr.onerror = testOnTimeoutEvent.step_func(unexpectedProgressEvent);
xhr.onload = testOnTimeoutEvent.step_func(unexpectedProgressEvent);
- xhr.timeout = 30;
- xhr.open("GET", "/resources/load-and-stall.php?name=../resources/test.mp4&stallAt=100&stallFor=10000&mimeType=video/mp4", true);
+ xhr.timeout = 1000;
tyoshino (SeeGerritForStatus) 2014/05/12 09:21:17 how about using value clearly greater than one pas
+ xhr.open("GET", "/resources/load-and-stall.php?name=../resources/test.mp4&stallAt=0&stallFor=1000&mimeType=video/mp4", true);
xhr.send();
+ // Defer overriding timeout
+ setTimeout(function() {
+ xhr.timeout = 400;
+ }, 200);
});
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698