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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/sync-xhr-doesnt-deadlock.html

Issue 1940253002: Disallow certain blocking DOM calls during microtask execution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 7 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 <title>Service Worker: SyncXHR doesn't deadlock</title> 2 <title>Service Worker: SyncXHR doesn't deadlock</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.js"></script> 5 <script src="resources/test-helpers.js"></script>
6 <script> 6 <script>
7 7
8 async_test(function(t) { 8 async_test(function(t) {
9 var url = 'resources/sync-xhr-doesnt-deadlock.js'; 9 var url = 'resources/sync-xhr-doesnt-deadlock.js';
10 var scope = 'resources/sync-xhr-doesnt-deadlock-iframe.html'; 10 var scope = 'resources/sync-xhr-doesnt-deadlock-iframe.html';
11 11
12 service_worker_unregister_and_register(t, url, scope) 12 service_worker_unregister_and_register(t, url, scope)
13 .then(function(registration) { 13 .then(function(registration) {
14 return wait_for_state(t, registration.installing, 'activated'); 14 return wait_for_state(t, registration.installing, 'activated');
15 }) 15 })
16 .then(function() { return with_iframe(scope); }) 16 .then(function() { return with_iframe(scope); })
17 .then(function(frame) { 17 .then(function(frame) {
18 frame.contentWindow.performSyncXHR(); 18 setTimeout(function() {
19 service_worker_unregister_and_done(t, scope); 19 frame.contentWindow.performSyncXHR();
20 service_worker_unregister_and_done(t, scope);
21 }, 0);
20 }) 22 })
21 .catch(unreached_rejection(t)); 23 .catch(unreached_rejection(t));
22 }, 'Verify SyncXHR does not deadlock'); 24 }, 'Verify SyncXHR does not deadlock');
23 </script> 25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698