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

Unified Diff: chrome/test/data/extensions/api_test/tabs/basics/test.js

Issue 3584010: Add chrome.windows.update({focused:true}); (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/api/extension_api.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/tabs/basics/test.js
diff --git a/chrome/test/data/extensions/api_test/tabs/basics/test.js b/chrome/test/data/extensions/api_test/tabs/basics/test.js
index 7b4c375e5dae555b924cc5f8e20f20f8f8e3717e..095bf40adde9eb4d276f8360007ab70819b798c3 100644
--- a/chrome/test/data/extensions/api_test/tabs/basics/test.js
+++ b/chrome/test/data/extensions/api_test/tabs/basics/test.js
@@ -440,6 +440,18 @@ chrome.test.runTests([
chrome.windows.create({"url": pageUrl("a")}, pass(function(tab) {}));
},
+ function windowSetFocused() {
+ chrome.windows.getCurrent(function(oldWin) {
+ chrome.windows.create({}, function(newWin) {
+ assertTrue(newWin.focused);
+ chrome.windows.update(oldWin.id, {focused:true});
+ chrome.windows.get(oldWin.id, pass(function(oldWin2) {
+ assertTrue(oldWin2.focused);
+ }));
+ });
+ });
+ },
+
/* TODO: Enable this test when crbug.com/28055 is fixed. This bug causes a
newly created window not to be set as the current window, if
Chrome was not the foreground window when the create call was made.
« no previous file with comments | « chrome/common/extensions/api/extension_api.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698