| OLD | NEW |
| 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 Loading... |
| 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> |
| OLD | NEW |