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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-body-blob-worker.js

Issue 1967683003: service worker: Wait for request body blobs to finish construction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-body-blob-iframe.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-body-blob-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-body-blob-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-body-blob-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..8a9c44bab98ee31d2e4c168e78a4c0249822572e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-body-blob-worker.js
@@ -0,0 +1,12 @@
+self.addEventListener('fetch', event => {
+ if (event.request.url.indexOf('?post-with-blob-body') == -1)
+ return;
+ event.respondWith(
+ event.request.text().then(resp => {
+ if (resp.indexOf('it\'s me the blob') == -1)
+ return new Response('fail');
+ if (resp.indexOf('and more blob!') == -1)
+ return new Response('fail');
+ return new Response('Pass');
+ }));
+ });
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-body-blob-iframe.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698