Chromium Code Reviews| Index: LayoutTests/http/tests/serviceworker/interfaces.html |
| diff --git a/LayoutTests/http/tests/serviceworker/interfaces.html b/LayoutTests/http/tests/serviceworker/interfaces.html |
| index 14940e0ecbd1b9eeca380e89680c1dffd3f98b10..83d12e479b968c58b795f0c1faa2d6b4f525cf21 100644 |
| --- a/LayoutTests/http/tests/serviceworker/interfaces.html |
| +++ b/LayoutTests/http/tests/serviceworker/interfaces.html |
| @@ -7,30 +7,39 @@ |
| <script> |
| test(function() { |
| - verifyInterface( |
| - 'ServiceWorkerContainer', navigator.serviceWorker, |
| - { |
| - register: 'function', |
| - unregister: 'function' |
| - }); |
| - |
| -}, 'Interfaces and attributes of ServiceWorkerContainer'); |
| + verifyInterface( |
| + 'ServiceWorkerContainer', navigator.serviceWorker, |
| + { |
| + register: 'function', |
| + unregister: 'function' |
| + }); |
| + }, 'Interfaces and attributes of ServiceWorkerContainer'); |
| async_test(function(t) { |
| - service_worker_unregister_and_register(t, 'resources/empty-worker.js') |
| - .then(t.step_func(function(worker) { |
| - var EVENT_HANDLER = 'object'; |
| - verifyInterface( |
| - 'ServiceWorker', worker, |
| - { |
| - scriptURL: 'string', |
| - state: 'string', |
| - |
| - onstatechange: EVENT_HANDLER |
| - }); |
| - t.done(); |
| - })); |
| -}, 'Interfaces and attributes of ServiceWorker'); |
| + var EVENT_HANDLER = 'object'; |
| + service_worker_unregister_and_register(t, 'resources/empty-worker.js') |
| + .then(function(registration) { |
| + verifyInterface( |
|
falken
2014/08/14 04:46:11
as this function is an argument, this should be in
horo
2014/08/14 07:11:46
Done.
|
| + 'ServiceWorkerRegistration', registration, |
| + { |
| + scope: 'string', |
| + unregister: 'function', |
| + onupdatefound: EVENT_HANDLER |
| + }); |
| + return wait_for_update(t, registration); |
| + }) |
| + .then(function(worker) { |
| + verifyInterface( |
| + 'ServiceWorker', worker, |
| + { |
| + scriptURL: 'string', |
| + state: 'string', |
| + onstatechange: EVENT_HANDLER |
| + }); |
| + t.done(); |
| + }) |
| + .catch(unreached_rejection(t)); |
| + }, 'Interfaces and attributes of ServiceWorker'); |
| service_worker_test( |
| 'resources/interfaces-worker.js', |