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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/interactive-state.cgi

Issue 1484743002: [XHR] Fix interactive-state.html layout test for the new ProgressEvent throttling algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed sleep to 1 sec Created 5 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/interactive-state.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/interactive-state.cgi
diff --git a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/interactive-state.cgi b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/interactive-state.cgi
index e02a94963affd0f2063992681c39d394b994020d..d044924c655c77e40b0a88668abf073280e9535f 100755
--- a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/interactive-state.cgi
+++ b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/interactive-state.cgi
@@ -1,12 +1,14 @@
#!/usr/bin/perl -wT
+use Time::HiRes;
+
# flush the buffers after each print
select (STDOUT);
$| = 1;
print "Content-Type: text/html\n\n";
-for ($count=1; $count<3000; $count++) {
+sub sendChunk() {
print "&#x0020;&#x0020; &#x0020;&#x0020;&#x0020;&#x0020;&#x20;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020; ";
print "&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020; ";
print "&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020; &#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020; ";
@@ -16,3 +18,9 @@ for ($count=1; $count<3000; $count++) {
print "&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x20;&#x0020;&#x0020;&#x0020; &#x0020;&#x0020;&#x0020;&#x0020;&#x0020; ";
print "&#x0020;&#x0020;&#x0020; &#x20; &#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020;&#x0020; ";
}
+
+sendChunk();
+# Delay for 1 s which should be long enough to exit the 50 ms slot of XHR's
+# ProgressEvent throttle (very long considering slow builds).
+Time::HiRes::sleep(1);
+sendChunk();
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/interactive-state.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698