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

Side by Side Diff: LayoutTests/http/tests/serviceworker/resources/client-focus.js

Issue 866043005: [ServiceWorker] Tests for WindowClient.focus(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@sw_openwindow_tests
Patch Set: review comment Created 5 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
« no previous file with comments | « LayoutTests/http/tests/serviceworker/client-focus.html ('k') | no next file » | 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 self.clients.getAll().then(function(clients) {
3 clients.forEach(function(client) {
4 if (('focus' in client) && (typeof(client.focus) == 'function'))
5 client.postMessage('focus() is present');
6 client.focus().then(function(result) {
7 client.postMessage('focus() succeeded with ' + result);
8 client.postMessage('quit');
9 }, function(e) {
10 client.postMessage('focus() failed with ' + e.name);
11 client.postMessage('quit');
12 });
13 });
14 });
15 }
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/serviceworker/client-focus.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698