2 <title>Service Worker: Interfaces
</title>
3 <script src=
"../resources/testharness.js"></script>
4 <script src=
"../resources/testharnessreport.js"></script>
5 <script src=
"resources/interfaces.js"></script>
6 <script src=
"resources/test-helpers.js"></script>
10 var EVENT_HANDLER
= 'object';
12 'ServiceWorkerContainer', navigator
.serviceWorker
,
15 getRegistration
: 'function',
16 oncontrollerchange
: EVENT_HANDLER
,
17 onmessage
: EVENT_HANDLER
19 }, 'Interfaces and attributes of ServiceWorkerContainer');
21 async_test(function(t
) {
22 var EVENT_HANDLER
= 'object';
23 var scope
= 'resources/scope/interfaces-and-attributes';
25 service_worker_unregister_and_register(
26 t
, 'resources/empty-worker.js', scope
)
27 .then(function(registration
) {
29 'ServiceWorkerRegistration', registration
,
35 unregister
: 'function',
36 onupdatefound
: EVENT_HANDLER
39 'ServiceWorker', registration
.installing
,
43 onstatechange
: EVENT_HANDLER
45 return registration
.unregister();
50 .catch(unreached_rejection(t
));
51 }, 'Interfaces and attributes of ServiceWorker');
54 'resources/interfaces-worker.js',
55 'Interfaces and attributes in ServiceWorkerGlobalScope');