summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 22:07:02 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 22:07:02 +0000
commit3a1d7b5857c03f1c2a465f9b41324a7a73dcdb45 (patch)
tree3c6a19d9b0b55d66725849f2261b836122131a32
parent2c6f51d3b6adac62075b3427d2cffdf77718315d (diff)
downloadchromium_src-3a1d7b5857c03f1c2a465f9b41324a7a73dcdb45.zip
chromium_src-3a1d7b5857c03f1c2a465f9b41324a7a73dcdb45.tar.gz
chromium_src-3a1d7b5857c03f1c2a465f9b41324a7a73dcdb45.tar.bz2
[Mac] more browser_tests cleanup
- get extension_browsertests_misc compiling - mark a bunch of tests with bugs and dependencies before they can come online - bring a bunch of tests online (also on linux) - Also removed some variables only used in one spot in the gyp file now. - Update all the browser_tests to use the MAYBE_ pattern to make sure we never get a conflict on the define BUG=none TEST=waterfall stays green Review URL: http://codereview.chromium.org/475008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34196 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser_browsertest.cc12
-rw-r--r--chrome/browser/extensions/browser_action_apitest.cc16
-rw-r--r--chrome/browser/extensions/cross_origin_xhr_apitest.cc6
-rw-r--r--chrome/browser/extensions/extension_browsertests_misc.cc52
-rwxr-xr-xchrome/chrome_tests.gypi10
5 files changed, 58 insertions, 38 deletions
diff --git a/chrome/browser/browser_browsertest.cc b/chrome/browser/browser_browsertest.cc
index 32fe5b5..958bfb0 100644
--- a/chrome/browser/browser_browsertest.cc
+++ b/chrome/browser/browser_browsertest.cc
@@ -106,10 +106,12 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, Title) {
#if defined(OS_MACOSX)
// http://crbug.com//29424
-#define JavascriptAlertActivatesTab DISABLED_JavascriptAlertActivatesTab
+#define MAYBE_JavascriptAlertActivatesTab DISABLED_JavascriptAlertActivatesTab
+#else
+#define MAYBE_JavascriptAlertActivatesTab JavascriptAlertActivatesTab
#endif
-IN_PROC_BROWSER_TEST_F(BrowserTest, JavascriptAlertActivatesTab) {
+IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_JavascriptAlertActivatesTab) {
GURL url(ui_test_utils::GetTestUrl(L".", L"title1.html"));
ui_test_utils::NavigateToURL(browser(), url);
browser()->AddTabWithURL(url, GURL(), PageTransition::TYPED,
@@ -151,12 +153,14 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, ThirtyFourTabs) {
#if defined(OS_MACOSX)
// http://crbug.com//29424
-#define ReloadThenCancelBeforeUnload DISABLED_ReloadThenCancelBeforeUnload
+#define MAYBE_ReloadThenCancelBeforeUnload DISABLED_ReloadThenCancelBeforeUnload
+#else
+#define MAYBE_ReloadThenCancelBeforeUnload ReloadThenCancelBeforeUnload
#endif
// Test for crbug.com/22004. Reloading a page with a before unload handler and
// then canceling the dialog should not leave the throbber spinning.
-IN_PROC_BROWSER_TEST_F(BrowserTest, ReloadThenCancelBeforeUnload) {
+IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_ReloadThenCancelBeforeUnload) {
GURL url("data:text/html," + BEFORE_UNLOAD_HTML);
ui_test_utils::NavigateToURL(browser(), url);
diff --git a/chrome/browser/extensions/browser_action_apitest.cc b/chrome/browser/extensions/browser_action_apitest.cc
index 4fa4c69..b7a16ac 100644
--- a/chrome/browser/extensions/browser_action_apitest.cc
+++ b/chrome/browser/extensions/browser_action_apitest.cc
@@ -139,12 +139,16 @@ class BrowserActionTest : public ExtensionApiTest {
#if defined(OS_MACOSX)
// http://crbug.com/29709 port to Mac
-#define Basic DISABLED_Basic
-#define DynamicBrowserAction DISABLED_DynamicBrowserAction
-#define TabSpecificBrowserActionState DISABLED_TabSpecificBrowserActionState
+#define MAYBE_Basic DISABLED_Basic
+#define MAYBE_DynamicBrowserAction DISABLED_DynamicBrowserAction
+#define MAYBE_TabSpecificBrowserActionState DISABLED_TabSpecificBrowserActionState
+#else
+#define MAYBE_Basic Basic
+#define MAYBE_DynamicBrowserAction DynamicBrowserAction
+#define MAYBE_TabSpecificBrowserActionState TabSpecificBrowserActionState
#endif
-IN_PROC_BROWSER_TEST_F(BrowserActionTest, Basic) {
+IN_PROC_BROWSER_TEST_F(BrowserActionTest, MAYBE_Basic) {
StartHTTPServer();
ASSERT_TRUE(RunExtensionTest("browser_action")) << message_;
@@ -185,7 +189,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionTest, Basic) {
ASSERT_TRUE(result);
}
-IN_PROC_BROWSER_TEST_F(BrowserActionTest, DynamicBrowserAction) {
+IN_PROC_BROWSER_TEST_F(BrowserActionTest, MAYBE_DynamicBrowserAction) {
ASSERT_TRUE(RunExtensionTest("browser_action_no_icon")) << message_;
// Test that there is a browser action in the toolbar and that it has no icon.
@@ -214,7 +218,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionTest, DynamicBrowserAction) {
// TODO(aa): Would be nice here to actually compare that the pixels change.
}
-IN_PROC_BROWSER_TEST_F(BrowserActionTest, TabSpecificBrowserActionState) {
+IN_PROC_BROWSER_TEST_F(BrowserActionTest, MAYBE_TabSpecificBrowserActionState) {
ASSERT_TRUE(RunExtensionTest("browser_action_tab_specific_state")) <<
message_;
diff --git a/chrome/browser/extensions/cross_origin_xhr_apitest.cc b/chrome/browser/extensions/cross_origin_xhr_apitest.cc
index 1986eba..efe7de1 100644
--- a/chrome/browser/extensions/cross_origin_xhr_apitest.cc
+++ b/chrome/browser/extensions/cross_origin_xhr_apitest.cc
@@ -6,10 +6,12 @@
#if defined(OS_MACOSX)
// http://crbug.com/29711
-#define CrossOriginXHR DISABLED_CrossOriginXHR
+#define MAYBE_CrossOriginXHR DISABLED_CrossOriginXHR
+#else
+#define MAYBE_CrossOriginXHR CrossOriginXHR
#endif
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CrossOriginXHR) {
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_CrossOriginXHR) {
host_resolver()->AddRule("*.com", "127.0.0.1");
StartHTTPServer();
ASSERT_TRUE(RunExtensionTest("cross_origin_xhr")) << message_;
diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc
index cf7fd9b..f17b72a 100644
--- a/chrome/browser/extensions/extension_browsertests_misc.cc
+++ b/chrome/browser/extensions/extension_browsertests_misc.cc
@@ -18,9 +18,9 @@
#include "chrome/browser/tab_contents/tab_contents.h"
#if defined(TOOLKIT_VIEWS)
#include "chrome/browser/views/extensions/extension_shelf.h"
+#include "chrome/browser/views/frame/browser_view.h"
#endif
-#include "chrome/browser/views/frame/browser_view.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension_error_reporter.h"
#include "chrome/common/notification_service.h"
@@ -84,6 +84,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, Toolstrip) {
EXPECT_TRUE(result);
#if defined(OS_WIN)
+ // http://crbug.com/29896 - tabs.detectLanguage is Windows only
+
// Test for compact language detection API. First navigate to a (static) html
// file with a French sentence. Then, run the test API in toolstrip1.html to
// actually call the language detection API through the existing extension,
@@ -100,7 +102,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, Toolstrip) {
#endif
}
-#if defined(OS_WIN) // TODO(port) -- enable
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ExtensionViews) {
FilePath extension_test_data_dir = test_data_dir_.AppendASCII("good").
AppendASCII("Extensions").AppendASCII("behllobkkfkfnphdnhnkndlbkcpglgmj").
@@ -139,9 +140,10 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ExtensionViews) {
host->render_view_host(), L"", L"testgetExtensionTabsAPI()", &result);
EXPECT_TRUE(result);
}
-#endif // defined(OS_WIN)
-#if defined(OS_WIN) // TODO(port) -- enable
+#if defined(TOOLKIT_VIEWS)
+// http://crbug.com/29897 - for other UI toolkits?
+
// Tests that the ExtensionShelf initializes properly, notices that
// an extension loaded and has a view available, and then sets that up
// properly.
@@ -164,7 +166,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, Shelf) {
EXPECT_EQ(shelf->GetChildViewCount(), 2);
EXPECT_NE(shelf->GetPreferredSize().height(), 0);
}
-#endif // defined(OS_WIN)
+#endif // defined(TOOLKIT_VIEWS)
// Tests that installing and uninstalling extensions don't crash with an
// incognito window open.
@@ -210,9 +212,22 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TabContents) {
EXPECT_TRUE(result);
}
-#if defined(OS_WIN) || defined(OS_LINUX)
+#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_TitleLocalizationBrowserAction DISABLED_TitleLocalizationBrowserAction
+#define MAYBE_TitleLocalizationPageAction DISABLED_TitleLocalizationPageAction
+#else
+#define MAYBE_PageAction PageAction
+#define MAYBE_UnloadPageAction UnloadPageAction
+#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, PageAction) {
+IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_PageAction) {
HTTPTestServer* server = StartHTTPServer();
// This page action will not show an icon, since it doesn't specify one but
@@ -240,7 +255,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageAction) {
}
// Tests that the location bar forgets about unloaded page actions.
-IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, UnloadPageAction) {
+IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_UnloadPageAction) {
HTTPTestServer* server = StartHTTPServer();
FilePath extension_path(test_data_dir_.AppendASCII("subscribe_page_action"));
@@ -259,7 +274,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, UnloadPageAction) {
// Tests that tooltips of a browser action icon can be specified using UTF8.
// See http://crbug.com/25349.
-IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationBrowserAction) {
+IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_TitleLocalizationBrowserAction) {
FilePath extension_path(test_data_dir_.AppendASCII("browsertest")
.AppendASCII("title_localized"));
ASSERT_TRUE(LoadExtension(extension_path));
@@ -280,7 +295,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationBrowserAction) {
// Tests that tooltips of a page action icon can be specified using UTF8.
// See http://crbug.com/25349.
-IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationPageAction) {
+IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_TitleLocalizationPageAction) {
HTTPTestServer* server = StartHTTPServer();
FilePath extension_path(test_data_dir_.AppendASCII("browsertest")
@@ -305,7 +320,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationPageAction) {
EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur").c_str(),
extension->page_action()->GetTitle(tab_id).c_str());
}
-#endif // defined(OS_WIN) || defined(OS_LINUX)
GURL GetFeedUrl(HTTPTestServer* server, const std::wstring& feed_page) {
static GURL base_url = server->TestServerPageW(kSubscribePage);
@@ -463,7 +477,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedInvalidFeed3) {
"Not a valid feed.");
}
-#if defined(OS_WIN) // TODO(port) - enable.
// Tests that message passing between extensions and tabs works.
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MessagingExtensionTab) {
ASSERT_TRUE(LoadExtension(
@@ -505,7 +518,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MessagingExtensionTab) {
host->render_view_host(), L"", L"testDisconnectOnClose()", &result);
EXPECT_TRUE(result);
}
-#endif // defined(OS_WIN)
// Tests that an error raised during an async function still fires
// the callback, but sets chrome.extension.lastError.
@@ -524,7 +536,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, LastError) {
EXPECT_TRUE(result);
}
-#if defined(OS_WIN) // TODO(port) - enable.
// Tests that message passing between extensions and content scripts works.
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MessagingContentScript) {
HTTPTestServer* server = StartHTTPServer();
@@ -583,7 +594,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MessagingContentScript) {
host->render_view_host(), L"", L"testDisconnectOnClose()", &result);
EXPECT_TRUE(result);
}
-#endif // defined(OS_WIN)
// TODO(mpcomplete): reenable after figuring it out.
#if 0
@@ -747,11 +757,16 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, WindowOpenNoPrivileges) {
EXPECT_FALSE(result);
}
+#if !defined(OS_WIN)
+// TODO(mpcomplete): http://crbug.com/29900 need cross platform plugin support.
+#define MAYBE_PluginLoadUnload DISABLED_PluginLoadUnload
+#else
+#define MAYBE_PluginLoadUnload PluginLoadUnload
+#endif
+
// Tests that a renderer's plugin list is properly updated when we load and
// unload an extension that contains a plugin.
-// TODO(mpcomplete): need cross platform plugin support.
-#if defined(OS_WIN)
-IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PluginLoadUnload) {
+IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_PluginLoadUnload) {
FilePath extension_dir =
test_data_dir_.AppendASCII("uitest").AppendASCII("plugins");
@@ -796,7 +811,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PluginLoadUnload) {
tab->render_view_host(), L"", L"testPluginWorks()", &result);
EXPECT_FALSE(result);
}
-#endif
// Tests extension autoupdate.
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, AutoUpdate) {
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 0c2e9e3..d4e52cb 100755
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -23,12 +23,6 @@
'browser/renderer_host/test/render_view_host_manager_browsertest.cc',
'browser/views/browser_views_accessibility_browsertest.cc',
],
- 'browser_tests_sources_exclude_on_mac': [
- # These fail to compile because they seem to drag in views headers.
- #
- 'browser/extensions/extension_browsertests_misc.cc',
- 'browser/extensions/page_action_apitest.cc',
- ],
# TODO(jcampan): move these vars to views.gyp.
'views_unit_tests_sources': [
'../views/view_unittest.cc',
@@ -1134,7 +1128,9 @@
}],
['OS=="mac"', {
'sources!': [
- '<@(browser_tests_sources_exclude_on_mac)',
+ # This fails to compile because it seem to drag in views headers.
+ # http://crbug.com/29895
+ 'browser/extensions/page_action_apitest.cc',
],
# TODO(mark): We really want this for all non-static library
# targets, but when we tried to pull it up to the common.gypi