Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / serviceworker / sync-xhr-doesnt-deadlock.html
blobaa071dd44b3f1df7615e04562dcdd9ce6ccb2527
1 <!DOCTYPE html>
2 <title>Service Worker: SyncXHR doesn't deadlock</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.js"></script>
6 <script>
8 async_test(function(t) {
9 var url = 'resources/sync-xhr-doesnt-deadlock.js';
10 var scope = 'resources/sync-xhr-doesnt-deadlock-iframe.html';
12 service_worker_unregister_and_register(t, url, scope)
13 .then(function(registration) {
14 return wait_for_state(t, registration.installing, 'activated');
16 .then(function() { return with_iframe(scope); })
17 .then(function(frame) {
18 frame.contentWindow.performSyncXHR();
19 service_worker_unregister_and_done(t, scope);
21 .catch(unreached_rejection(t));
22 }, 'Verify SyncXHR does not deadlock');
23 </script>