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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/respond-with-readable-stream.html

Issue 2893793004: Upstream service wrkr "respond with" tests to WPT (Closed)
Patch Set: Remove declaration of unused binding Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <title>respondWith with a response built from a ReadableStream</title>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 <script src="resources/test-helpers.js"></script>
7 <script>
8 const WORKER =
9 'resources/respond-with-readable-stream-worker.js';
10 const SCOPE =
11 'resources/respond-with-readable-stream-iframe.html';
12 var resolve_done;
13 var done_was_called = new Promise(resolve => resolve_done = resolve);
14 // Called by the iframe when done.
15 function done(result) { resolve_done(result); }
16
17 promise_test(t => {
18 return service_worker_unregister_and_register(t, WORKER, SCOPE)
19 .then(reg => {
20 add_completion_callback(() => reg.unregister());
21 return wait_for_state(t, reg.installing, 'activated');
22 })
23 .then(() => with_iframe(SCOPE))
24 .then(() => done_was_called)
25 .then(result => assert_equals(result, 'PASS'));
26 }, 'Respond with a Response built from a ReadableStream');
27 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698