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

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

Issue 2668783003: Import wpt@767dc2a4f049c761bd146d61de2ea860a895a624 (Closed)
Patch Set: Update test expectations and baselines. Created 3 years, 10 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 'Test calling waitUntil with an existing extension promise handler succeeds'); 66 'Test calling waitUntil with an existing extension promise handler succeeds');
67 67
68 // The promise handler will queue a new microtask after the check for new 68 // The promise handler will queue a new microtask after the check for new
69 // extensions was performed. 69 // extensions was performed.
70 async_test(msg_event_test.bind(this, 'current-extension-expired-same-microtask-t urn-extra'), 70 async_test(msg_event_test.bind(this, 'current-extension-expired-same-microtask-t urn-extra'),
71 'Test calling waitUntil at the end of the microtask turn throws'); 71 'Test calling waitUntil at the end of the microtask turn throws');
72 72
73 async_test(msg_event_test.bind(this, 'current-extension-expired-different-task') , 73 async_test(msg_event_test.bind(this, 'current-extension-expired-different-task') ,
74 'Test calling waitUntil after the current extension expired in a different tas k fails'); 74 'Test calling waitUntil after the current extension expired in a different tas k fails');
75 75
76 async_test(msg_event_test.bind(this, 'script-extendable-event'),
77 'Test calling waitUntil on a script constructed ExtendableEvent throws excepti on');
78
76 async_test(function(t) { 79 async_test(function(t) {
77 var testBody = function(worker) { 80 var testBody = function(worker) {
78 return with_iframe('./resources/pending-respondwith-async-waituntil/dummy. html'); 81 return with_iframe('./resources/pending-respondwith-async-waituntil/dummy. html');
79 } 82 }
80 runTest(t, 'pending-respondwith-async-waituntil', testBody); 83 runTest(t, 'pending-respondwith-async-waituntil', testBody);
81 }, 'Test calling waitUntil asynchronously with pending respondWith promise.'); 84 }, 'Test calling waitUntil asynchronously with pending respondWith promise.');
82 </script> 85 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698