OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Service Worker: Interfaces</title> |
| 3 <script src="/resources/testharness.js"></script> |
| 4 <script src="/resources/testharnessreport.js"></script> |
| 5 <script src="/resources/WebIDLParser.js"></script> |
| 6 <script src="/resources/idlharness.js"></script> |
| 7 <script src="resources/interfaces-idls.js"></script> |
| 8 <script src="resources/test-helpers.sub.js"></script> |
| 9 <script> |
| 10 'use strict'; |
| 11 |
| 12 var idlArray = new IdlArray(); |
| 13 idlArray.add_untested_idls(idls.untested); |
| 14 idlArray.add_idls(idls.tested); |
| 15 idlArray.add_objects({ |
| 16 ServiceWorkerContainer: ['navigator.serviceWorker'] |
| 17 }); |
| 18 |
| 19 promise_test(function(t) { |
| 20 var scope = 'resources/scope/interfaces-and-attributes'; |
| 21 |
| 22 return service_worker_unregister_and_register( |
| 23 t, 'resources/empty-worker.js', scope) |
| 24 .then(function(registration) { |
| 25 t.add_cleanup(function() { |
| 26 registration.unregister(); |
| 27 }); |
| 28 |
| 29 window.registrationInstance = registration; |
| 30 idlArray.add_objects({ |
| 31 ServiceWorkerRegistration: ['window.registrationInstance'], |
| 32 ServiceWorker: ['window.registrationInstance.installing'] |
| 33 }); |
| 34 idlArray.test(); |
| 35 }); |
| 36 }, 'test setup (worker registration)'); |
| 37 </script> |
OLD | NEW |