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

Side by Side Diff: LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/registration-attribute.html

Issue 822593003: ServiceWorker: Expose registration within ServiceWorkerGlobalScope [3/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@expose_swreg
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>ServiceWorkerGlobalScope: registration</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../resources/test-helpers.js"></script>
6 <script>
7
8 promise_test(function(t) {
9 var script = "resources/registration-attribute-worker.js";
10 var scope = "resources/scope/registration-attribute";
11
12 return navigator.serviceWorker.register(script, {scope: scope})
13 .then(function(registration) {
14 return wait_for_state(t, registration.installing, 'activated');
15 })
16 .then(function() { return with_iframe(scope); })
17 .then(function(frame) {
18 assert_equals(
19 frame.contentDocument.body.textContent,
20 'Hello, world!',
21 'Service Worker should respond to fetch');
falken 2015/01/19 08:45:04 let's remove the frame and then call unregister_an
nhiroki 2015/01/20 11:10:07 Done.
22 })
23 .then(function() {
24 return service_worker_unregister_and_done(t, scope);
25 });
26 }, 'Verify registration attribute on ServiceWorkerGlobalScope');
27
28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698