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

Unified Diff: LayoutTests/http/tests/xmlhttprequest/resources/slow-failure.cgi

Issue 1181973005: [XHR] Fix a XHR-stream test script. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/resources/response-stream-orphaned-promise.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/xmlhttprequest/resources/slow-failure.cgi
diff --git a/LayoutTests/http/tests/xmlhttprequest/resources/slow-failure.cgi b/LayoutTests/http/tests/xmlhttprequest/resources/slow-failure.cgi
index 8b2b92f6371bee97be4903a26e73b2c5423b7ead..bd09f32fb74b74f3f8485125d1c80676cae76304 100755
--- a/LayoutTests/http/tests/xmlhttprequest/resources/slow-failure.cgi
+++ b/LayoutTests/http/tests/xmlhttprequest/resources/slow-failure.cgi
@@ -1,5 +1,9 @@
#!/usr/bin/perl
+# This script outputs a broken transfer-encoded response. In order to deliver
+# didReceiveResponse to the client (i.e. XHR), we send a small valid chunk
+# first, wait a while and then send an invalid chunk.
+
use IO::Socket;
$| = 1;
@@ -7,8 +11,10 @@ $| = 1;
autoflush STDOUT 1;
print "Content-Type: text/html; charset=us-ascii\n";
+print "X-Content-Type-Options: nosniff\n";
print "Transfer-encoding: chunked\n\n";
+print "5\nhello\n";
sleep 2;
print "hoge\nfuga\n";
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/resources/response-stream-orphaned-promise.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698