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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/extendable-event-async-waituntil.https.html

Issue 2877543003: [ServiceWorker] Allow waitUntil to be called multiple times asynchronously (Closed)
Patch Set: Address comments from shimazu@ 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="/resources/testharness.js"></script> 2 <script src="/resources/testharness.js"></script>
3 <script src="resources/testharness-helpers.js"></script> 3 <script src="resources/testharness-helpers.js"></script>
4 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.sub.js"></script> 5 <script src="resources/test-helpers.sub.js"></script>
6 <script> 6 <script>
7 7
8 function sync_message(worker, message, transfer) { 8 function sync_message(worker, message, transfer) {
9 let wait = new Promise((res, rej) => { 9 let wait = new Promise((res, rej) => {
10 navigator.serviceWorker.addEventListener('message', function(e) { 10 navigator.serviceWorker.addEventListener('message', function(e) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 async_test(msg_event_test.bind(this, 'script-extendable-event'), 76 async_test(msg_event_test.bind(this, 'script-extendable-event'),
77 'Test calling waitUntil on a script constructed ExtendableEvent throws excepti on'); 77 'Test calling waitUntil on a script constructed ExtendableEvent throws excepti on');
78 78
79 async_test(function(t) { 79 async_test(function(t) {
80 var testBody = function(worker) { 80 var testBody = function(worker) {
81 return with_iframe('./resources/pending-respondwith-async-waituntil/dummy. html'); 81 return with_iframe('./resources/pending-respondwith-async-waituntil/dummy. html');
82 } 82 }
83 runTest(t, 'pending-respondwith-async-waituntil', testBody); 83 runTest(t, 'pending-respondwith-async-waituntil', testBody);
84 }, 'Test calling waitUntil asynchronously with pending respondWith promise.'); 84 }, 'Test calling waitUntil asynchronously with pending respondWith promise.');
85
86 async_test(function(t) {
87 var testBody = function(worker) {
88 return with_iframe('./resources/respondwith-microtask-sync-waituntil/dummy .html');
89 }
90 runTest(t, 'respondwith-microtask-sync-waituntil', testBody);
91 }, 'Test calling waitUntil synchronously inside microtask of respondWith promi se.');
92
93 async_test(function(t) {
94 var testBody = function(worker) {
95 return with_iframe('./resources/respondwith-microtask-async-waituntil/dumm y.html');
96 }
97 runTest(t, 'respondwith-microtask-async-waituntil', testBody);
98 }, 'Test calling waitUntil asynchronously inside microtask of respondWith prom ise.');
99
100
85 </script> 101 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698