Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/chunked-encoding-scope.php |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/chunked-encoding-scope.php b/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/chunked-encoding-scope.php |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c70ce320f421ad65c37f7bcb2052ddd3b929edcd |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/chunked-encoding-scope.php |
| @@ -0,0 +1,18 @@ |
| +<?php |
| + function put_chunk($txt) { |
| + echo sprintf("%x\r\n", strlen($txt)); |
| + echo "$txt\r\n"; |
| + } |
| + header("Content-type: text/html; charset=UTF-8"); |
| + header("Transfer-encoding: chunked"); |
| + ob_flush(); |
| + flush(); |
| + usleep(10000); |
|
falken
2017/01/18 14:24:59
Can you comment why we need usleep and how you cho
horo
2017/01/18 16:14:57
Done.
But I have no specific reason to chose 10,0
|
| + for ($i = 0; $i < 10; $i++) { |
| + put_chunk("$i"); |
| + ob_flush(); |
| + flush(); |
| + usleep(10000); |
| + } |
| + echo "0\r\n\r\n"; |
| +?> |