Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/postmessage-blob-url.js |
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/postmessage-blob-url.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/postmessage-blob-url.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..661c66dd3a7c3f1fb72bb10553c8f3e8f71d87e3 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/postmessage-blob-url.js |
@@ -0,0 +1,11 @@ |
+self.onmessage = e => { |
+ if ('port' in e.data) { |
+ let port = e.data.port; |
+ port.onmessage = (e) => { |
+ fetch(e.data) |
+ .then(response => response.text()) |
+ .then(text => port.postMessage('Worker reply:' + text)); |
+ }; |
+ port.postMessage('Connected'); |
+ } |
+}; |