OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Service Worker: claim client using registration</title> | 2 <title>Service Worker: claim client using registration</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/testharness-helpers.js"></script> |
5 <script src="resources/test-helpers.js"></script> | 5 <script src="/resources/testharnessreport.js"></script> |
| 6 <script src="resources/test-helpers.sub.js"></script> |
6 <script> | 7 <script> |
7 | 8 |
8 promise_test(function(t) { | 9 promise_test(function(t) { |
9 var scope = 'resources/'; | 10 var scope = 'resources/'; |
10 var frame_url = 'resources/blank.html?using-different-registration'; | 11 var frame_url = 'resources/blank.html?using-different-registration'; |
11 var url1 = 'resources/empty.js'; | 12 var url1 = 'resources/empty.js'; |
12 var url2 = 'resources/claim-worker.js'; | 13 var url2 = 'resources/claim-worker.js'; |
13 var worker, sw_registration, frame; | 14 var worker, sw_registration, frame; |
14 return service_worker_unregister_and_register(t, url1, scope) | 15 return service_worker_unregister_and_register(t, url1, scope) |
15 .then(function(registration) { | 16 .then(function(registration) { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 return saw_message; | 91 return saw_message; |
91 }) | 92 }) |
92 .then(function() { | 93 .then(function() { |
93 frame.remove(); | 94 frame.remove(); |
94 return service_worker_unregister_and_done(t, scope); | 95 return service_worker_unregister_and_done(t, scope); |
95 }); | 96 }); |
96 }, 'Test for the waiting worker claims a client which is using the the ' + | 97 }, 'Test for the waiting worker claims a client which is using the the ' + |
97 'same registration'); | 98 'same registration'); |
98 | 99 |
99 </script> | 100 </script> |
OLD | NEW |