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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/fetch-event-after-navigation-within-page.html

Issue 2695803007: service worker: Remove some LayoutTests that are redundant with WPT tests. (Closed)
Patch Set: changes Created 3 years, 10 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>ServiceWorker: navigator.serviceWorker.waiting</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.js"></script>
6 <body>
7 <script>
8
9 promise_test(function(t) {
10 var scope =
11 'resources/fetch-event-after-navigation-within-page-iframe.html' +
12 '?hashchange';
13 var worker = 'resources/simple-intercept-worker.js';
14 var frame;
15
16 return service_worker_unregister_and_register(t, worker, scope)
17 .then(function(reg) {
18 return wait_for_state(t, reg.installing, 'activated');
19 })
20 .then(function() { return with_iframe(scope); })
21 .then(function(f) {
22 frame = f;
23 return frame.contentWindow.fetch_url('simple.txt');
24 })
25 .then(function(response) {
26 assert_equals(response, 'intercepted by service worker');
27 frame.contentWindow.location.hash = 'foo';
28 return frame.contentWindow.fetch_url('simple.txt');
29 })
30 .then(function(response) {
31 assert_equals(response, 'intercepted by service worker');
32 frame.remove();
33 return service_worker_unregister_and_done(t, scope);
34 })
35 }, 'Service Worker should respond to fetch event after the hash changes');
36
37 promise_test(function(t) {
38 var scope =
39 'resources/fetch-event-after-navigation-within-page-iframe.html' +
40 '?pushState';
41 var worker = 'resources/simple-intercept-worker.js';
42 var frame;
43
44 return service_worker_unregister_and_register(t, worker, scope)
45 .then(function(reg) {
46 return wait_for_state(t, reg.installing, 'activated');
47 })
48 .then(function() { return with_iframe(scope); })
49 .then(function(f) {
50 frame = f;
51 return frame.contentWindow.fetch_url('simple.txt');
52 })
53 .then(function(response) {
54 assert_equals(response, 'intercepted by service worker');
55 frame.contentWindow.history.pushState('', '', 'bar');
56 return frame.contentWindow.fetch_url('simple.txt');
57 })
58 .then(function(response) {
59 assert_equals(response, 'intercepted by service worker');
60 frame.remove();
61 return service_worker_unregister_and_done(t, scope);
62 })
63 }, 'Service Worker should respond to fetch event after the pushState');
64
65 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698