summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorandybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-10 00:47:13 +0000
committerandybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-10 00:47:13 +0000
commita97108d5ef4b26d7a5a994b36d682dc15b196705 (patch)
treec4c68bda7b3678025b44bde2939d1225cc8ccd49 /chrome/browser
parente655884873225a8b146ee2f992baafbfdcacb344 (diff)
downloadchromium_src-a97108d5ef4b26d7a5a994b36d682dc15b196705.zip
chromium_src-a97108d5ef4b26d7a5a994b36d682dc15b196705.tar.gz
chromium_src-a97108d5ef4b26d7a5a994b36d682dc15b196705.tar.bz2
[Mac] Enables extension browser tests previously disabled for the mac due to lack of implementation.
BUG=29898 TEST=Run ExtensionBrowserTest.* and PageActionPopupTest.* and make sure they all pass. Review URL: http://codereview.chromium.org/601011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38553 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/cocoa/location_bar_view_mac.mm6
-rw-r--r--chrome/browser/extensions/extension_browsertests_misc.cc28
-rw-r--r--chrome/browser/extensions/page_action_apitest.cc12
3 files changed, 13 insertions, 33 deletions
diff --git a/chrome/browser/cocoa/location_bar_view_mac.mm b/chrome/browser/cocoa/location_bar_view_mac.mm
index d255a11..12557c7 100644
--- a/chrome/browser/cocoa/location_bar_view_mac.mm
+++ b/chrome/browser/cocoa/location_bar_view_mac.mm
@@ -414,7 +414,11 @@ ExtensionAction* LocationBarViewMac::GetVisiblePageAction(size_t index) {
}
void LocationBarViewMac::TestPageActionPressed(size_t index) {
- NOTIMPLEMENTED();
+ if (index >= page_action_views_.Count()) {
+ NOTREACHED();
+ return;
+ }
+ page_action_views_.OnMousePressed(NSZeroRect, index);
}
NSImage* LocationBarViewMac::GetTabButtonImage() {
diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc
index c09e98d..ddc9b6f 100644
--- a/chrome/browser/extensions/extension_browsertests_misc.cc
+++ b/chrome/browser/extensions/extension_browsertests_misc.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -200,24 +200,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TabContents) {
EXPECT_TRUE(result);
}
-#if defined(OS_MACOSX)
-// http://crbug.com/29898 LocationBarViewMac has a bunch of unimpl apis that
-// keep these from working
-#define MAYBE_PageAction DISABLED_PageAction
-#define MAYBE_UnloadPageAction DISABLED_UnloadPageAction
-#define MAYBE_RSSMultiRelLink DISABLED_RSSMultiRelLink
-#define MAYBE_TitleLocalizationBrowserAction DISABLED_TitleLocalizationBrowserAction
-#define MAYBE_TitleLocalizationPageAction DISABLED_TitleLocalizationPageAction
-#else
-#define MAYBE_PageAction PageAction
-#define MAYBE_UnloadPageAction UnloadPageAction
-#define MAYBE_RSSMultiRelLink RSSMultiRelLink
-#define MAYBE_TitleLocalizationBrowserAction TitleLocalizationBrowserAction
-#define MAYBE_TitleLocalizationPageAction TitleLocalizationPageAction
-#endif
-
// Tests that we can load page actions in the Omnibox.
-IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_PageAction) {
+IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageAction) {
HTTPTestServer* server = StartHTTPServer();
// This page action will not show an icon, since it doesn't specify one but
@@ -245,7 +229,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_PageAction) {
}
// Tests that the location bar forgets about unloaded page actions.
-IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_UnloadPageAction) {
+IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, UnloadPageAction) {
HTTPTestServer* server = StartHTTPServer();
FilePath extension_path(test_data_dir_.AppendASCII("subscribe_page_action"));
@@ -264,7 +248,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_UnloadPageAction) {
// Makes sure that the RSS detects RSS feed links, even when rel tag contains
// more than just "alternate".
-IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_RSSMultiRelLink) {
+IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, RSSMultiRelLink) {
HTTPTestServer* server = StartHTTPServer();
ASSERT_TRUE(LoadExtension(
@@ -281,7 +265,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_RSSMultiRelLink) {
// Tests that tooltips of a browser action icon can be specified using UTF8.
// See http://crbug.com/25349.
-IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_TitleLocalizationBrowserAction) {
+IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationBrowserAction) {
FilePath extension_path(test_data_dir_.AppendASCII("browsertest")
.AppendASCII("title_localized"));
ASSERT_TRUE(LoadExtension(extension_path));
@@ -302,7 +286,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_TitleLocalizationBrowserActio
// Tests that tooltips of a page action icon can be specified using UTF8.
// See http://crbug.com/25349.
-IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_TitleLocalizationPageAction) {
+IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationPageAction) {
HTTPTestServer* server = StartHTTPServer();
FilePath extension_path(test_data_dir_.AppendASCII("browsertest")
diff --git a/chrome/browser/extensions/page_action_apitest.cc b/chrome/browser/extensions/page_action_apitest.cc
index e26e4ab..5b42890 100644
--- a/chrome/browser/extensions/page_action_apitest.cc
+++ b/chrome/browser/extensions/page_action_apitest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -200,16 +200,8 @@ public:
bool last_visibility_;
};
-#if defined(OS_MACOSX)
-// The following test fails on Mac because some of page action implementation is
-// missing in LocationBarView (see http://crbug.com/29898).
-#define MAYBE_Show DISABLED_Show
-#else
-#define MAYBE_Show Show
-#endif
-
// Tests popups in page actions.
-IN_PROC_BROWSER_TEST_F(PageActionPopupTest, MAYBE_Show) {
+IN_PROC_BROWSER_TEST_F(PageActionPopupTest, Show) {
NotificationRegistrar registrar;
registrar.Add(this,
NotificationType::EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,