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