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

Unified Diff: chrome/test/data/extensions/api_test/browser_action/open_popup/open_popup_succeeds.js

Issue 25305002: Implement initial chrome.browserAction.openPopup API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
Index: chrome/test/data/extensions/api_test/browser_action/open_popup/open_popup_succeeds.js
diff --git a/chrome/test/data/extensions/api_test/browser_action/open_popup/open_popup_succeeds.js b/chrome/test/data/extensions/api_test/browser_action/open_popup/open_popup_succeeds.js
new file mode 100644
index 0000000000000000000000000000000000000000..a1a03b85bc7049b2dbea9dd7749f1da727b3f997
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/browser_action/open_popup/open_popup_succeeds.js
@@ -0,0 +1,16 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Open a popup then return control to the ApiTest.
+// The ApiTest can reply to the ready message to request another popup to open.
+chrome.browserAction.openPopup(function(wind) {
Finnur 2013/10/15 10:44:21 s/wind/window/
justinlin 2013/10/16 07:06:48 isn't window a reserved keyword? changed to popupW
+ chrome.test.assertTrue(!!wind);
+ chrome.test.notifyPass();
+ chrome.test.sendMessage('ready', function() {
+ chrome.browserAction.openPopup(function(wind) {
+ chrome.test.assertTrue(!!wind);
+ chrome.test.succeed();
+ });
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698