Index: LayoutTests/http/tests/serviceworker/sync-xhr-doesnt-deadlock.html |
diff --git a/LayoutTests/http/tests/serviceworker/sync-xhr-doesnt-deadlock.html b/LayoutTests/http/tests/serviceworker/sync-xhr-doesnt-deadlock.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7d171ab55d199b6f8135339d9fe741647271b925 |
--- /dev/null |
+++ b/LayoutTests/http/tests/serviceworker/sync-xhr-doesnt-deadlock.html |
@@ -0,0 +1,23 @@ |
+<!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_activated(t, registration); |
+ }) |
+ .then(function() { return with_iframe(scope); }) |
+ .then(function(frame) { |
+ frame.contentWindow.performSyncXHR(); |
+ service_worker_unregister_and_done(t, scope); |
+ }) |
+ .catch(unreached_rejection(t)); |
+ }, 'Verify SyncXHR does not deadlock'); |
+</script> |