OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="/resources/testharness.js"></script> | 2 <script src="/resources/testharness.js"></script> |
3 <script src="/resources/testharnessreport.js"></script> | 3 <script src="/resources/testharnessreport.js"></script> |
4 <script src="resources/test-helpers.sub.js"></script> | 4 <script src="resources/test-helpers.sub.js"></script> |
5 <body> | 5 <body> |
6 <script> | 6 <script> |
7 var worker_url = 'resources/empty-worker.js'; | 7 var worker_url = 'resources/empty-worker.js'; |
8 | 8 |
9 async_test(function(t) { | 9 async_test(function(t) { |
10 var scope = 'resources/scope/subsequent-register-from-same-window'; | 10 var scope = 'resources/scope/subsequent-register-from-same-window'; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 'installing worker should be null'); | 64 'installing worker should be null'); |
65 assert_equals( | 65 assert_equals( |
66 registration.waiting, null, | 66 registration.waiting, null, |
67 'waiting worker should be null') | 67 'waiting worker should be null') |
68 assert_equals( | 68 assert_equals( |
69 new_registration.waiting, null, | 69 new_registration.waiting, null, |
70 'waiting worker should be null') | 70 'waiting worker should be null') |
71 | 71 |
72 assert_not_equals( | 72 assert_not_equals( |
73 registration.active, new_registration.active, | 73 registration.active, new_registration.active, |
74 'registration should have the different active worker'); | 74 'registration should have a different active worker'); |
75 assert_equals( | 75 assert_equals( |
76 registration.active.scriptURL, | 76 registration.active.scriptURL, |
77 new_registration.active.scriptURL, | 77 new_registration.active.scriptURL, |
78 'active workers should have the same script URL'); | 78 'active workers should have the same script URL'); |
79 assert_equals( | 79 assert_equals( |
80 registration.active.state, | 80 registration.active.state, |
81 new_registration.active.state, | 81 new_registration.active.state, |
82 'active workers should be in the same state'); | 82 'active workers should be in the same state'); |
83 | 83 |
84 frame.remove(); | 84 frame.remove(); |
(...skipping 23 matching lines...) Expand all Loading... |
108 'register should resolve to the same registration'); | 108 'register should resolve to the same registration'); |
109 }); | 109 }); |
110 return registrations[0].unregister(); | 110 return registrations[0].unregister(); |
111 }) | 111 }) |
112 .then(function() { t.done(); }) | 112 .then(function() { t.done(); }) |
113 .catch(unreached_rejection(t)); | 113 .catch(unreached_rejection(t)); |
114 }, 'Concurrent registrations resolve to the same registration object'); | 114 }, 'Concurrent registrations resolve to the same registration object'); |
115 | 115 |
116 </script> | 116 </script> |
117 </body> | 117 </body> |
OLD | NEW |