Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / resources / load-and-stall.cgi
blobf0aa12dae7c1251e25d0895aa0c0170873214363
1 #!/usr/bin/perl -wT
3 use CGI;
4 use File::stat;
5 use Time::HiRes;
7 $query = new CGI;
8 $name = $query->param('name');
9 $stallAt = $query->param('stallAt');
10 $stallFor = $query->param('stallFor');
11 $mimeType = $query->param('mimeType');
13 my $filesize = stat($name)->size;
14 print "Content-type: " . $mimeType . "\n";
15 print "Content-Length: " . $filesize . "\n\n";
17 open FILE, $name or die;
18 binmode FILE;
19 $total = 0;
20 my ($buf, $data, $n);
21 while (($n = read FILE, $data, 1024) != 0) {
22 $total += $n;
23 if ($total > $stallAt) {
24 if (defined $stallFor) {
25 Time::HiRes::sleep($stallFor)
27 last;
29 print $data;
31 close(FILE);