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

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

Issue 466723002: ServiceWorker: Enable ServiceWorkerRegistration and update layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@updatefound
Patch Set: apply horo@'s patch (PatchSet 25 on https://codereview.chromium.org/468753003/) 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..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',

Powered by Google App Engine
This is Rietveld 408576698