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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/windowclient-navigate-worker.js

Issue 1387303002: Yaho Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/serviceworker/windowclient-navigate.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 self.onmessage = function(e) {
2 var url = e.data;
3 var host;
4 var client;
5
6 self.clients.matchAll({ includeUncontrolled : true }).then(function(cs) {
7 cs.forEach(function(c) {
8 if (c.url.search('#message') != -1)
9 host = c;
10 else if (c.url.search('#client') != -1)
11 client= c;
12 });
13 client.navigate(url).then(function(c) {
14 if (!c)
15 host.postMessage(c);
16 else
17 host.postMessage(c.url);
18 })
19 .catch(function(e) {
20 console.log(e);
21 console.log(e.name);
22 host.postMessage(e.name);
23 });
24 });
25 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/serviceworker/windowclient-navigate.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698