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

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: Make SWDataPipeReader::State private 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 <title>Service Worker: Stopping the worker during responding to a fetch</title>
falken 2017/04/18 05:05:34 add comment: This is in chromium/ because it relie
shimazu 2017/04/19 05:49:47 Done.
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../resources/test-helpers.js"></script>
6 <script>
7
8 promise_test(t => {
9 var SCOPE = 'resources/slow-fetch-and-stop-worker-iframe.html';
10 var SCRIPT = 'resources/respondwith-fetch-worker.js';
11 return service_worker_unregister_and_register(t, SCRIPT, SCOPE)
12 .then(r => {
13 add_completion_callback(() => r.unregister());
14 return wait_for_state(t, r.installing, 'activated');
15 })
16 .then(() => { return with_iframe(SCOPE, {auto_remove: true}); })
17 .then(f => {
18 return new Promise(resolve => {
19 addEventListener('message', resolve);
20 f.contentWindow.postMessage('run', '*');
21 })
22 })
23 .then(e => {
24 assert_equals(e.data, 'Rejected successfully');
25 });
26 }, 'Stopping the worker during responding fetch event cancels the request.');
27
28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698