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

Unified Diff: LayoutTests/http/tests/serviceworker/chromium/resources/service-worker-proxied-mixed-response-worker.js

Issue 1226473002: Add LayoutTests for mixed range response handling. (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
Index: LayoutTests/http/tests/serviceworker/chromium/resources/service-worker-proxied-mixed-response-worker.js
diff --git a/LayoutTests/http/tests/serviceworker/chromium/resources/service-worker-proxied-mixed-response-worker.js b/LayoutTests/http/tests/serviceworker/chromium/resources/service-worker-proxied-mixed-response-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..7c136b1fefb8d83a1dd6e5ad699f74c4cafc03f3
--- /dev/null
+++ b/LayoutTests/http/tests/serviceworker/chromium/resources/service-worker-proxied-mixed-response-worker.js
@@ -0,0 +1,11 @@
+self.addEventListener('fetch', function(event) {
+ if (event.request.url.indexOf('blank.html') != -1) {
+ // The request is for the page load.
+ return;
+ }
+ if (event.request.headers.get('range') != 'bytes=0-') {
+ // The request is not the first range request.
+ return;
+ }
+ event.respondWith(fetch('service-worker-proxied-mixed-response.php'));
+});
falken 2015/07/03 04:10:36 indent two
horo 2015/07/06 11:45:40 Done.

Powered by Google App Engine
This is Rietveld 408576698