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

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: 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
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

Powered by Google App Engine
This is Rietveld 408576698