OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Service Worker: controlling a SharedWorker</title> | 2 <title>Service Worker: controlling a SharedWorker</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.sub.js"></script> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 promise_test(function(t) { | 8 promise_test(function(t) { |
9 var shared_worker = 'resources/shared-worker-controlled.js'; | 9 var shared_worker = 'resources/shared-worker-controlled.js'; |
10 var service_worker = 'resources/simple-intercept-worker.js'; | 10 var service_worker = 'resources/simple-intercept-worker.js'; |
11 var scope = shared_worker; | 11 var scope = shared_worker; |
12 | 12 |
13 return service_worker_unregister_and_register(t, service_worker, scope) | 13 return service_worker_unregister_and_register(t, service_worker, scope) |
14 .then(function(r) { | 14 .then(function(r) { |
15 return wait_for_state(t, r.installing, 'activated'); | 15 return wait_for_state(t, r.installing, 'activated'); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 }); | 69 }); |
70 }) | 70 }) |
71 .then(function(data) { | 71 .then(function(data) { |
72 assert_equals(data, 'worker loading intercepted by service worker'); | 72 assert_equals(data, 'worker loading intercepted by service worker'); |
73 service_worker_unregister_and_done(t, scope); | 73 service_worker_unregister_and_done(t, scope); |
74 }); | 74 }); |
75 }, 'Verify importScripts from SharedWorker is controlled by a Service Worker')
; | 75 }, 'Verify importScripts from SharedWorker is controlled by a Service Worker')
; |
76 </script> | 76 </script> |
77 </body> | 77 </body> |
OLD | NEW |