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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/slow-fetch-and-stop-worker-iframe.html

Issue 2703343002: ServiceWorker: Use mojo's data pipe for respondWith(stream) (Closed)
Patch Set: Rebased Created 3 years, 8 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: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/slow-fetch-and-stop-worker-iframe.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/slow-fetch-and-stop-worker-iframe.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/slow-fetch-and-stop-worker-iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..04b211398a08075e77290d749ce8a450f5445fe2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/slow-fetch-and-stop-worker-iframe.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<script>
+addEventListener('message', e => {
+ fetch('./slow-response.php')
+ .then(response => {
+ internals.terminateServiceWorker(navigator.serviceWorker.controller);
+ return response.text();
+ })
+ .then(() => {
+ e.source.postMessage(
+ 'Ugr.. Canceled respondWith resolves the promise somehow.',
+ e.origin);
+ })
+ .catch(() => {
+ e.source.postMessage('Rejected successfully', e.origin);
+ });
+ });
+</script>

Powered by Google App Engine
This is Rietveld 408576698