diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-28 04:09:56 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-28 04:09:56 +0000 |
commit | 041cc77a3e315fa6b5230c825726d919327dd4a1 (patch) | |
tree | 32b2c701951da2bcdea75eb40bff8a21b6f22d86 /chrome/browser | |
parent | 9e8a226e75c01c40a5d1509010dd7c73c2c46668 (diff) | |
download | chromium_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/browser')
-rw-r--r-- | chrome/browser/extensions/extension_apitest.h | 5 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_browsertests_misc.cc | 11 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_startup_unittest.cc | 5 |
3 files changed, 16 insertions, 5 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 |