Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: LayoutTests/http/tests/serviceworker/interfaces.html

Issue 468753003: SW tests update (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 467133002 and fix test Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..72ce573973a8288c8cbc7355400d01a8db0d5057 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(
+ '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',
« no previous file with comments | « LayoutTests/http/tests/serviceworker/installing.html ('k') | LayoutTests/http/tests/serviceworker/postmessage.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698