Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / serviceworker / interfaces.html
blob8fc2a43433108e90ee1bdf63c3d464d3dcc2e755
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/interfaces.js"></script>
6 <script src="resources/test-helpers.js"></script>
7 <script>
9 test(function() {
10 var EVENT_HANDLER = 'object';
11 verify_interface(
12 'ServiceWorkerContainer', navigator.serviceWorker,
14 register: 'function',
15 getRegistration: 'function',
16 oncontrollerchange: EVENT_HANDLER,
17 onmessage: EVENT_HANDLER
18 });
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) {
28 verify_interface(
29 'ServiceWorkerRegistration', registration,
31 installing: 'object',
32 waiting: 'object',
33 active: 'object',
34 scope: 'string',
35 unregister: 'function',
36 onupdatefound: EVENT_HANDLER
37 });
38 verify_interface(
39 'ServiceWorker', registration.installing,
41 scriptURL: 'string',
42 state: 'string',
43 onstatechange: EVENT_HANDLER
44 });
45 return registration.unregister();
47 .then(function() {
48 t.done();
50 .catch(unreached_rejection(t));
51 }, 'Interfaces and attributes of ServiceWorker');
53 service_worker_test(
54 'resources/interfaces-worker.js',
55 'Interfaces and attributes in ServiceWorkerGlobalScope');
57 </script>