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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/update-after-navigation-fetch-event.https.html

Issue 2415873002: Import w3c tests for the service workers (Closed)
Patch Set: Rebase Created 4 years, 2 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>Service Worker: Update should be triggered after a navigation fetch event .</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.sub.js"></script>
6 <script>
7
8 promise_test(function(t) {
9 var script = 'resources/update-nocookie-worker.py';
10 var scope = 'resources/scope/update';
11 var parsed_url = normalizeURL(script);
12 var registration;
13 var frame;
14
15 return service_worker_unregister_and_register(t, parsed_url, scope)
16 .then(function(r) {
17 registration = r;
18 return wait_for_state(t, registration.installing, 'activated');
19 })
20 .then(function() {
21 // Navigation to the iframe.
22 return with_iframe(scope);
23 })
24 .then(function(f) {
25 frame = f;
26 // Navigation fetch event should trigger update.
27 return wait_for_update(t, registration);
28 })
29 .then(function() {
30 frame.remove();
31 return service_worker_unregister_and_done(t, scope);
32 })
33 }, 'Update should be triggered after a navigation fetch event.');
34 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698