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

Unified Diff: chrome/browser/extensions/browser_action_test_util_views.cc

Issue 506069: [Mac] Port browser action popup test to mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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/browser/extensions/browser_action_test_util_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/browser_action_test_util_views.cc
===================================================================
--- chrome/browser/extensions/browser_action_test_util_views.cc (revision 34954)
+++ chrome/browser/extensions/browser_action_test_util_views.cc (working copy)
@@ -4,6 +4,8 @@
#include "chrome/browser/extensions/browser_action_test_util.h"
+#include "base/gfx/rect.h"
+#include "base/gfx/size.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_window.h"
@@ -43,3 +45,25 @@
GetTooltipText(0, 0, &text);
return WideToUTF8(text);
}
+
+bool BrowserActionTestUtil::HasPopup() {
+ return GetContainer(browser_)->TestGetPopup() != NULL;
+}
+
+gfx::Rect BrowserActionTestUtil::GetPopupBounds() {
+ return GetContainer(browser_)->TestGetPopup()->view()->bounds();
+}
+
+bool BrowserActionTestUtil::HidePopup() {
+ BrowserActionsContainer* container = GetContainer(browser_);
+ container->HidePopup();
+ return !HasPopup();
+}
+
+gfx::Size BrowserActionTestUtil::GetMinPopupSize() {
+ return gfx::Size(ExtensionPopup::kMinWidth, ExtensionPopup::kMinHeight);
+}
+
+gfx::Size BrowserActionTestUtil::GetMaxPopupSize() {
+ return gfx::Size(ExtensionPopup::kMaxWidth, ExtensionPopup::kMaxHeight);
+}
« no previous file with comments | « chrome/browser/extensions/browser_action_test_util_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698