diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-06 20:02:09 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-06 20:02:09 +0000 |
commit | 0701fe7ccd95a80ced9351b0a4251bb0f0431a93 (patch) | |
tree | aa135a10d9f75dbcc20113a5eacb3b93e1472bbb /chrome/test/plugin | |
parent | 00c556b9280a9548e9cd0c614f9bfe06bfe3a13e (diff) | |
download | chromium_src-0701fe7ccd95a80ced9351b0a4251bb0f0431a93.zip chromium_src-0701fe7ccd95a80ced9351b0a4251bb0f0431a93.tar.gz chromium_src-0701fe7ccd95a80ced9351b0a4251bb0f0431a93.tar.bz2 |
POSIX: Disable all plugin tests on Linux/Mac except PluginTest.Flash, so plugin_tests can actually succeed when we enable it on test bots. Change PluginTest.Flash to pass in the correct Flash plugin file name on all platforms.
BUG=28716
TEST=none
Review URL: http://codereview.chromium.org/1775015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/plugin')
-rw-r--r-- | chrome/test/plugin/plugin_test.cpp | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/chrome/test/plugin/plugin_test.cpp b/chrome/test/plugin/plugin_test.cpp index b7149a5..a787a86 100644 --- a/chrome/test/plugin/plugin_test.cpp +++ b/chrome/test/plugin/plugin_test.cpp @@ -72,7 +72,7 @@ class PluginTest : public UITest { UITest::SetUp(); } -#endif +#endif // defined(OS_WIN) void TestPlugin(const std::string& test_case, int timeout, @@ -106,11 +106,39 @@ class PluginTest : public UITest { GURL url = GetTestUrl("done", mock_http); scoped_refptr<TabProxy> tab(GetActiveTab()); - ASSERT_TRUE(WaitUntilCookieValue(tab, url, kTestCompleteCookie, - wait_time, kTestCompleteSuccess)); + const std::string result = + WaitUntilCookieNonEmpty(tab, url, kTestCompleteCookie, wait_time); + ASSERT_EQ(kTestCompleteSuccess, result); } }; +TEST_F(PluginTest, Flash) { + // Note: This does not work with the npwrapper on 64-bit Linux. Install the + // native 64-bit Flash to run the test. + // TODO(thestig) Update this list if we decide to only test against internal + // Flash plugin in the future? + std::string kFlashQuery = +#if defined(OS_WIN) + "npswf32.dll" +#elif defined(OS_MACOSX) + "Flash Player.plugin" +#elif defined(OS_POSIX) + "libflashplayer.so" +#endif + ; + TestPlugin("flash.html?" + kFlashQuery, action_max_timeout_ms(), false); +} + +#if defined(OS_WIN) +// Windows only test +TEST_F(PluginTest, FlashSecurity) { + TestPlugin("flash.html", action_max_timeout_ms(), false); +} +#endif // defined(OS_WIN) + +#if defined(OS_WIN) +// TODO(port) Port the following tests to platforms that have the required +// plugins. TEST_F(PluginTest, Quicktime) { TestPlugin("quicktime.html", action_max_timeout_ms(), false); } @@ -128,18 +156,10 @@ TEST_F(PluginTest, Real) { TestPlugin("real.html", action_max_timeout_ms(), false); } -TEST_F(PluginTest, Flash) { - TestPlugin("flash.html", action_max_timeout_ms(), false); -} - TEST_F(PluginTest, FlashOctetStream) { TestPlugin("flash-octet-stream.html", action_max_timeout_ms(), false); } -TEST_F(PluginTest, FlashSecurity) { - TestPlugin("flash.html", action_max_timeout_ms(), false); -} - // http://crbug.com/16114 // Flaky, http://crbug.com/21538 TEST_F(PluginTest, FLAKY_FlashLayoutWhilePainting) { @@ -155,3 +175,4 @@ TEST_F(PluginTest, DISABLED_Java) { TEST_F(PluginTest, FLAKY_Silverlight) { TestPlugin("silverlight.html", action_max_timeout_ms(), false); } +#endif // defined(OS_WIN) |