Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / incremental / doc-write-before-end.pl
blob56bbe15bdb75bf24297e049f72e6df8f22740581
1 #!/usr/bin/perl -wT
3 # Flush STDOUT after each print.
4 select (STDOUT);
5 $| = 1;
7 print "Content-Type: text/html; charset=utf-8\n";
8 print "Expires: Thu, 01 Dec 2003 16:00:00 GMT\n";
9 print "Cache-Control: no-store, no-cache, must-revalidate\n";
10 print "Pragma: no-cache\n";
11 print "\n";
13 print "\xef\xbb\xbf<!DOCTYPE html><body>";
14 print "<script>if (window.testRunner) window.testRunner.dumpAsText();</script>";
15 print "<img src='404.gif' onerror='document.write(\"PASS\"); document.close()'>";
16 # Dump some spaces to bypass CFNetwork buffering.
17 for ($count = 1; $count < 4000; $count++) {
18 print " ";
21 # Delay to force the second line of text to be decoded as a separate chunk.
22 sleep 1;
23 print "FAIL</body>";