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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/stop-worker-during-respond-with.html

Issue 2703343002: ServiceWorker: Use mojo's data pipe for respondWith(stream) (Closed)
Patch Set: Addressed comments from kinuko and haraken 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!-- This is in chromium/ because it relies on the internals API to terminate a
3 service worker. -->
4 <title>Service Worker: Stopping the worker during responding to a fetch</title>
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../resources/test-helpers.js"></script>
8 <script>
9
10 promise_test(t => {
11 var SCOPE = 'resources/slow-fetch-and-stop-worker-iframe.html';
12 var SCRIPT = 'resources/respondwith-fetch-worker.js';
13 return service_worker_unregister_and_register(t, SCRIPT, SCOPE)
14 .then(r => {
15 add_completion_callback(() => r.unregister());
16 return wait_for_state(t, r.installing, 'activated');
17 })
18 .then(() => { return with_iframe(SCOPE, {auto_remove: true}); })
19 .then(f => {
20 return new Promise(resolve => {
21 addEventListener('message', resolve);
22 f.contentWindow.postMessage('run', '*');
23 })
24 })
25 .then(e => {
26 assert_equals(e.data, 'Rejected successfully');
27 });
28 }, 'Stopping the worker during responding fetch event cancels the request.');
29
30 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698