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

Side by Side Diff: chrome/test/data/extensions/platform_apps/window_api_interactive/test.js

Issue 461303002: [Mac] Bounce app shims when app windows request attention. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update FakeHost in test. Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm ('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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var callbackPass = chrome.test.callbackPass; 5 var callbackPass = chrome.test.callbackPass;
6 6
7 function testWindowGetsFocus(win) { 7 function testWindowGetsFocus(win) {
8 // If the window is already focused, we are done. 8 // If the window is already focused, we are done.
9 if (win.contentWindow.document.hasFocus()) { 9 if (win.contentWindow.document.hasFocus()) {
10 chrome.test.assertTrue(win.contentWindow.document.hasFocus(), 10 chrome.test.assertTrue(win.contentWindow.document.hasFocus(),
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // We remove this and disable the entire test for Linux GTK when the 214 // We remove this and disable the entire test for Linux GTK when the
215 // test will run on other platforms, see http://crbug.com/328829 215 // test will run on other platforms, see http://crbug.com/328829
216 if (navigator.platform.indexOf('Linux') != 0) 216 if (navigator.platform.indexOf('Linux') != 0)
217 testWindowGetsFocus(win); 217 testWindowGetsFocus(win);
218 }); 218 });
219 })); 219 }));
220 }, 220 },
221 ]); 221 ]);
222 } 222 }
223 223
224 function testDrawAttention() {
225 chrome.test.runTests([
226 function drawThenClearAttention() {
227 chrome.app.window.create('test.html', {}, callbackPass(function(win) {
228 win.drawAttention();
229 win.clearAttention();
230 }));
231 }
232 ]);
233 }
234
224 chrome.app.runtime.onLaunched.addListener(function() { 235 chrome.app.runtime.onLaunched.addListener(function() {
225 chrome.test.sendMessage('Launched', function(reply) { 236 chrome.test.sendMessage('Launched', function(reply) {
226 window[reply](); 237 window[reply]();
227 }); 238 });
228 }); 239 });
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698