diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 20:11:44 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 20:11:44 +0000 |
commit | d1d74b9f367025fa7363189b7be012d277245341 (patch) | |
tree | 818a46ea76f4c7d284b3618b1f13b72d49465467 /chrome/browser | |
parent | 2d003f2735ce0bf299fca38759e57f99b2e0eabf (diff) | |
download | chromium_src-d1d74b9f367025fa7363189b7be012d277245341.zip chromium_src-d1d74b9f367025fa7363189b7be012d277245341.tar.gz chromium_src-d1d74b9f367025fa7363189b7be012d277245341.tar.bz2 |
Use Views version of BrowserActionTest for linux/view build.
BUG=None
TEST=browser_tess --gtest_filter=BrowserActionTest* should pass on linux/view build.
Review URL: http://codereview.chromium.org/404021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32383 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser_window.h | 4 | ||||
-rw-r--r-- | chrome/browser/extensions/browser_action_apitest.cc | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/browser_window.h b/chrome/browser/browser_window.h index 5c6feba..d45659c 100644 --- a/chrome/browser/browser_window.h +++ b/chrome/browser/browser_window.h @@ -291,7 +291,7 @@ class BrowserWindow { virtual void DestroyBrowser() = 0; }; -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(TOOLKIT_VIEWS) class BookmarkBarView; class LocationBarView; @@ -304,7 +304,7 @@ class View; // UI used only by UI test automation. class BrowserWindowTesting { public: -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(TOOLKIT_VIEWS) // Returns the BookmarkBarView. virtual BookmarkBarView* GetBookmarkBarView() const = 0; diff --git a/chrome/browser/extensions/browser_action_apitest.cc b/chrome/browser/extensions/browser_action_apitest.cc index d4043eb..37802c7 100644 --- a/chrome/browser/extensions/browser_action_apitest.cc +++ b/chrome/browser/extensions/browser_action_apitest.cc @@ -13,7 +13,7 @@ #include "chrome/common/extensions/extension_action.h" #include "chrome/test/ui_test_utils.h" -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(TOOLKIT_VIEWS) #include "chrome/browser/views/browser_actions_container.h" #include "chrome/browser/views/extensions/extension_popup.h" #include "chrome/browser/views/toolbar_view.h" @@ -29,7 +29,7 @@ class BrowserActionTest : public ExtensionApiTest { int NumberOfBrowserActions() { int rv = -1; -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(TOOLKIT_VIEWS) BrowserActionsContainer* browser_actions = browser()->window()->GetBrowserWindowTesting()->GetToolbarView()-> browser_actions(); @@ -52,7 +52,7 @@ class BrowserActionTest : public ExtensionApiTest { } bool IsIconNull(int index) { -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(TOOLKIT_VIEWS) BrowserActionsContainer* browser_actions = browser()->window()->GetBrowserWindowTesting()->GetToolbarView()-> browser_actions(); @@ -75,13 +75,13 @@ class BrowserActionTest : public ExtensionApiTest { } void ExecuteBrowserAction(int index) { -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(TOOLKIT_VIEWS) BrowserActionsContainer* browser_actions = browser()->window()->GetBrowserWindowTesting()->GetToolbarView()-> browser_actions(); ASSERT_TRUE(browser_actions); browser_actions->TestExecuteBrowserAction(index); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(TOOLKIT_VIEWS) GtkWidget* button = GetButton(index); ASSERT_TRUE(button); gtk_button_clicked(GTK_BUTTON(button)); @@ -89,7 +89,7 @@ class BrowserActionTest : public ExtensionApiTest { } std::string GetTooltip(int index) { -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(TOOLKIT_VIEWS) BrowserActionsContainer* browser_actions = browser()->window()->GetBrowserWindowTesting()->GetToolbarView()-> browser_actions(); @@ -113,7 +113,7 @@ class BrowserActionTest : public ExtensionApiTest { } private: -#if defined(OS_LINUX) +#if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) GtkWidget* GetButton(int index) { GtkWidget* rv = NULL; GtkWidget* toolbar = ViewIDUtil::GetWidget( |