| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Service Worker: Clients.matchAll on script evaluation</title> | 2 <title>Service Worker: Clients.matchAll on script evaluation</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 <script> | 6 <script> |
| 7 promise_test(function(t) { | 7 promise_test(function(t) { |
| 8 var script = 'resources/clients-matchall-on-evaluation-worker.js'; | 8 var script = 'resources/clients-matchall-on-evaluation-worker.js'; |
| 9 var scope = 'resources/blank.html?clients-matchAll-on-evaluation'; | 9 var scope = 'resources/blank.html?clients-matchAll-on-evaluation'; |
| 10 | 10 |
| 11 var saw_message = new Promise(function(resolve) { | 11 var saw_message = new Promise(function(resolve) { |
| 12 navigator.serviceWorker.onmessage = function(e) { | 12 navigator.serviceWorker.onmessage = function(e) { |
| 13 assert_equals(e.data, 'matched'); | 13 assert_equals(e.data, 'matched'); |
| 14 resolve(); | 14 resolve(); |
| 15 }; | 15 }; |
| 16 }); | 16 }); |
| 17 | 17 |
| 18 return service_worker_unregister_and_register(t, script, scope) | 18 return service_worker_unregister_and_register(t, script, scope) |
| 19 .then(function(registration) { | 19 .then(function(registration) { |
| 20 add_completion_callback(function() { registration.unregister(); }); | 20 add_completion_callback(function() { registration.unregister(); }); |
| 21 return saw_message; | 21 return saw_message; |
| 22 }); | 22 }); |
| 23 }, 'Test Clients.matchAll() on script evaluation'); | 23 }, 'Test Clients.matchAll() on script evaluation'); |
| 24 </script> | 24 </script> |
| OLD | NEW |