| <!DOCTYPE html> |
| <title>Service Worker: SyncXHR doesn't deadlock</title> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <script src="resources/test-helpers.js"></script> |
| <script> |
| |
| async_test(function(t) { |
| var url = 'resources/sync-xhr-doesnt-deadlock.js'; |
| var scope = 'resources/sync-xhr-doesnt-deadlock-iframe.html'; |
| |
| service_worker_unregister_and_register(t, url, scope) |
| .then(function(registration) { |
| return wait_for_state(t, registration.installing, 'activated'); |
| }) |
| .then(function() { return with_iframe(scope); }) |
| .then(function(frame) { |
| setTimeout(function() { |
| frame.contentWindow.performSyncXHR(); |
| service_worker_unregister_and_done(t, scope); |
| }, 0); |
| }) |
| .catch(unreached_rejection(t)); |
| }, 'Verify SyncXHR does not deadlock'); |
| </script> |