Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <title>Service Worker: Synchronous XHR doesn't deadlock</title> | |
|
falken
2017/05/29 04:22:15
is intercepted
mike3
2017/05/29 16:14:21
Done.
| |
| 3 <script src="/resources/testharness.js"></script> | |
| 4 <script src="/resources/testharnessreport.js"></script> | |
| 5 <script src="resources/test-helpers.sub.js"></script> | |
| 6 <script> | |
| 7 'use strict'; | |
| 8 | |
| 9 promise_test(function(t) { | |
| 10 var url = 'resources/fetch-request-xhr-sync-worker.js'; | |
| 11 var scope = 'resources/fetch-request-xhr-sync-iframe.html'; | |
| 12 | |
| 13 return service_worker_unregister_and_register(t, url, scope) | |
| 14 .then(function(registration) { | |
| 15 t.add_cleanup(function() { | |
| 16 registration.unregister(); | |
| 17 }); | |
| 18 | |
| 19 return wait_for_state(t, registration.installing, 'activated'); | |
| 20 }) | |
| 21 .then(function() { return with_iframe(scope); }) | |
| 22 .then(function(frame) { | |
| 23 t.add_cleanup(function() { | |
| 24 frame.remove(); | |
| 25 }); | |
| 26 | |
| 27 return new Promise(function(resolve, reject) { | |
| 28 setTimeout(function() { | |
| 29 try { | |
| 30 frame.contentWindow.performSyncXHR(); | |
| 31 resolve(); | |
| 32 } catch (err) { | |
| 33 reject(err); | |
| 34 } | |
| 35 }, 0); | |
| 36 }); | |
| 37 }); | |
| 38 }, 'Verify SyncXHR does not deadlock'); | |
|
falken
2017/05/29 04:22:15
Verify SyncXHR is intercepted
mike3
2017/05/29 16:14:21
Done.
| |
| 39 </script> | |
| OLD | NEW |