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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/client-navigate-worker.js

Issue 2695813009: Import wpt@503f5b5f78ec4e87d144f78609f363f0ed0ea8db (Closed)
Patch Set: Skip some tests 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
1 importScripts("worker-testharness.js"); 1 importScripts("worker-testharness.js");
2 importScripts("test-helpers.sub.js"); 2 importScripts("test-helpers.sub.js");
3 importScripts("get-host-info.sub.js") 3 importScripts("/common/get-host-info.sub.js")
4 importScripts("testharness-helpers.js") 4 importScripts("testharness-helpers.js")
5 5
6 self.onfetch = function(e) { 6 self.onfetch = function(e) {
7 if (e.request.url.indexOf("client-navigate-frame.html") >= 0) { 7 if (e.request.url.indexOf("client-navigate-frame.html") >= 0) {
8 if (e.clientId === null) { 8 if (e.clientId === null) {
9 e.respondWith(fetch(e.request)); 9 e.respondWith(fetch(e.request));
10 } else { 10 } else {
11 e.respondWith(Response.error()); 11 e.respondWith(Response.error());
12 } 12 }
13 return; 13 return;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 return self.clients.get(clientId) 62 return self.clients.get(clientId)
63 .then(client => client.navigate("redirect.py?Redirect=" + url)) 63 .then(client => client.navigate("redirect.py?Redirect=" + url))
64 .then(client => { 64 .then(client => {
65 clientUrl = (client && client.url) || "" 65 clientUrl = (client && client.url) || ""
66 assert_true(client === null); 66 assert_true(client === null);
67 }) 67 })
68 .catch(unreached_rejection(t)); 68 .catch(unreached_rejection(t));
69 }, "Redirecting to another origin should resolve with null"); 69 }, "Redirecting to another origin should resolve with null");
70 } 70 }
71 }; 71 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698