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

Side by Side Diff: LayoutTests/http/tests/serviceworker/resources/progressive.php

Issue 1192913007: Change BodyStreamBuffer to be FetchDataConsumerHandle-based and enable backpressure in Fetch API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: (temp) alternative to calling didGetReadable in sync. Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 <?php 1 <?php
2 function put_chunk($txt) { 2 function put_chunk($txt) {
3 echo sprintf("%x\r\n", strlen($txt)); 3 echo sprintf("%x\r\n", strlen($txt));
4 echo "$txt\r\n"; 4 echo "$txt\r\n";
5 } 5 }
6 6
7 header("Content-type: application/octet-stream"); 7 header("Content-type: application/octet-stream");
8 header("Transfer-encoding: chunked"); 8 header("Transfer-encoding: chunked");
9 flush(); 9 flush();
10 10
11 for ($i = 0; $i < 100; $i++) { 11 for ($i = 0; $i < 100; $i++) {
12 put_chunk("$i"); 12 put_chunk("$i");
13 ob_flush(); 13 ob_flush();
14 flush(); 14 flush();
15 usleep(1000); 15 usleep(1000);
16 } 16 }
17 echo "0\r\n\r\n"; 17 echo "0\r\n\r\n";
18 ?> 18 ?>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698