summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-28 04:09:56 +0000
committerrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-28 04:09:56 +0000
commit041cc77a3e315fa6b5230c825726d919327dd4a1 (patch)
tree32b2c701951da2bcdea75eb40bff8a21b6f22d86 /chrome
parent9e8a226e75c01c40a5d1509010dd7c73c2c46668 (diff)
downloadchromium_src-041cc77a3e315fa6b5230c825726d919327dd4a1.zip
chromium_src-041cc77a3e315fa6b5230c825726d919327dd4a1.tar.gz
chromium_src-041cc77a3e315fa6b5230c825726d919327dd4a1.tar.bz2
Enable a bunch of extension browsertests for linux
Review URL: http://codereview.chromium.org/173545 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24720 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/extensions/extension_apitest.h5
-rw-r--r--chrome/browser/extensions/extension_browsertests_misc.cc11
-rw-r--r--chrome/browser/extensions/extension_startup_unittest.cc5
-rw-r--r--chrome/chrome.gyp24
4 files changed, 34 insertions, 11 deletions
diff --git a/chrome/browser/extensions/extension_apitest.h b/chrome/browser/extensions/extension_apitest.h
index 9e1885b..af2dd28 100644
--- a/chrome/browser/extensions/extension_apitest.h
+++ b/chrome/browser/extensions/extension_apitest.h
@@ -30,9 +30,8 @@ class ExtensionApiTest : public ExtensionBrowserTest {
virtual void SetUpCommandLine(CommandLine* command_line);
// NotificationObserver
- void ExtensionApiTest::Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ void Observe(NotificationType type, const NotificationSource& source,
+ const NotificationDetails& details);
// Did the extension side of the unit test complete?
bool completed_;
diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc
index 8d0a1af..35902f5 100644
--- a/chrome/browser/extensions/extension_browsertests_misc.cc
+++ b/chrome/browser/extensions/extension_browsertests_misc.cc
@@ -13,7 +13,12 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/site_instance.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#if defined(TOOLKIT_GTK)
+#include "chrome/browser/gtk/extension_shelf_gtk.h"
+#else
#include "chrome/browser/views/extensions/extension_shelf.h"
+#endif // defined(TOOLKIT_GTK)
+
#include "chrome/browser/views/frame/browser_view.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension_error_reporter.h"
@@ -95,7 +100,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ExtensionViews) {
"test_gettabs.html");
ui_test_utils::NavigateToURL(
browser(),
- GURL(gettabs_url.ToWStringHack()));
+ GURL(gettabs_url.value()));
bool result = false;
ui_test_utils::ExecuteJavaScriptAndExtractBool(
@@ -117,6 +122,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ExtensionViews) {
EXPECT_TRUE(result);
}
+#if defined(OS_WIN)
// Tests that the ExtensionShelf initializes properly, notices that
// an extension loaded and has a view available, and then sets that up
// properly.
@@ -139,6 +145,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, Shelf) {
EXPECT_EQ(shelf->GetChildViewCount(), 2);
EXPECT_NE(shelf->GetPreferredSize().height(), 0);
}
+#endif // defined(OS_WIN)
// Tests that installing and uninstalling extensions don't crash with an
// incognito window open.
@@ -185,6 +192,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TabContents) {
EXPECT_TRUE(result);
}
+#if defined(OS_WIN)
// Tests that we can load page actions in the Omnibox.
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageAction) {
ASSERT_TRUE(LoadExtension(
@@ -211,6 +219,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageAction) {
ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(no_feed));
ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(0));
}
+#endif //defined(OS_WIN)
GURL GetFeedUrl(const std::string& feed_page) {
FilePath test_dir;
diff --git a/chrome/browser/extensions/extension_startup_unittest.cc b/chrome/browser/extensions/extension_startup_unittest.cc
index 74d40a9..889ac8e 100644
--- a/chrome/browser/extensions/extension_startup_unittest.cc
+++ b/chrome/browser/extensions/extension_startup_unittest.cc
@@ -87,6 +87,8 @@ class ExtensionStartupTestBase
case NotificationType::USER_SCRIPTS_UPDATED:
MessageLoopForUI::current()->Quit();
break;
+ default:
+ NOTREACHED();
}
}
@@ -170,11 +172,12 @@ class ExtensionsStartupTest : public ExtensionStartupTestBase {
}
};
+#if defined(OS_WIN)
IN_PROC_BROWSER_TEST_F(ExtensionsStartupTest, Test) {
WaitForServicesToStart(3, true);
TestInjection(true, true);
}
-
+#endif // defined(OS_WIN)
// ExtensionsLoadTest
// Ensures that we can startup the browser with --load-extension and see them
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 2e3ed33..0977155 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -41,19 +41,19 @@
'browser/gtk/bookmark_manager_browsertest.cc',
'browser/gtk/view_id_util_browsertest.cc',
'browser/ssl/ssl_browser_tests.cc',
- ],
- 'browser_tests_sources_win_specific': [
'browser/extensions/extension_apitest.cc',
'browser/extensions/extension_apitest.h',
'browser/extensions/extension_bookmarks_apitest.cc',
- 'browser/extensions/extension_devtools_browsertest.cc',
- 'browser/extensions/extension_devtools_browsertest.h',
- 'browser/extensions/extension_devtools_browsertests.cc',
'browser/extensions/extension_browsertest.cc',
'browser/extensions/extension_browsertest.h',
'browser/extensions/extension_browsertests_misc.cc',
- 'browser/extensions/extension_shelf_model_unittest.cc',
'browser/extensions/extension_startup_unittest.cc',
+ ],
+ 'browser_tests_sources_win_specific': [
+ 'browser/extensions/extension_devtools_browsertest.cc',
+ 'browser/extensions/extension_devtools_browsertest.h',
+ 'browser/extensions/extension_devtools_browsertests.cc',
+ 'browser/extensions/extension_shelf_model_unittest.cc',
'browser/views/browser_views_accessibility_browsertest.cc',
'browser/views/find_bar_win_browsertest.cc',
# TODO(jam): http://crbug.com/15101 These tests fail on Linux and Mac.
@@ -64,6 +64,15 @@
# non win specific section.
'browser/task_manager_browsertest.cc',
],
+ 'browser_tests_sources_exclude_on_mac': [
+ 'browser/extensions/extension_apitest.cc',
+ 'browser/extensions/extension_apitest.h',
+ 'browser/extensions/extension_bookmarks_apitest.cc',
+ 'browser/extensions/extension_browsertest.cc',
+ 'browser/extensions/extension_browsertest.h',
+ 'browser/extensions/extension_browsertests_misc.cc',
+ 'browser/extensions/extension_startup_unittest.cc',
+ ],
# TODO(jcampan): move these vars to views.gyp.
'views_unit_tests_sources': [
'../views/view_unittest.cc',
@@ -5257,6 +5266,9 @@
'app/keystone_glue.h',
'app/keystone_glue.m',
],
+ 'sources!': [
+ '<@(browser_tests_sources_exclude_on_mac)',
+ ],
# TODO(mark): We really want this for all non-static library targets,
# but when we tried to pull it up to the common.gypi level, it broke
# other things like the ui, startup, and page_cycler tests. *shrug*