summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugin_test.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-20 16:04:00 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-20 16:04:00 +0000
commit37b339ffbcad2c8a5561084d669ad57c289e4f79 (patch)
treeb007b4548786c0d5d19c985ee20c4bc3062c0d56 /chrome/browser/plugin_test.cc
parenta0ebaca028cd268336f1dfcb67f780ccd7cd1794 (diff)
downloadchromium_src-37b339ffbcad2c8a5561084d669ad57c289e4f79.zip
chromium_src-37b339ffbcad2c8a5561084d669ad57c289e4f79.tar.gz
chromium_src-37b339ffbcad2c8a5561084d669ad57c289e4f79.tar.bz2
Convert the npapi interactive_ui_test, layout_plugin ui_test, and npapi ui_test to browser_tests. I renabled the tests, hopefully they're not flaky anymore with the rewrite.
NPObjectReleasedOnDestruction and SelfDeletePluginInvokeAlert weren't testing anything because they broke after the WebKit test plugin changed, so I fixed them. BUG=121574, 30702, 60071, 46257 Review URL: https://chromiumcodereview.appspot.com/10145001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133204 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_test.cc')
-rw-r--r--chrome/browser/plugin_test.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/chrome/browser/plugin_test.cc b/chrome/browser/plugin_test.cc
index 917b7ac..1f342b1 100644
--- a/chrome/browser/plugin_test.cc
+++ b/chrome/browser/plugin_test.cc
@@ -168,6 +168,30 @@ TEST_F(ClickToPlayPluginTest, Flash) {
WaitForFinish(TestTimeouts::action_max_timeout_ms(), true);
}
+TEST_F(ClickToPlayPluginTest, LoadAllBlockedPlugins) {
+ scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
+ ASSERT_TRUE(browser.get());
+ ASSERT_TRUE(browser->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS,
+ CONTENT_SETTING_BLOCK));
+
+ GURL url(URLRequestMockHTTPJob::GetMockUrl(
+ FilePath(FILE_PATH_LITERAL("npapi/load_all_blocked_plugins.html"))));
+ ASSERT_NO_FATAL_FAILURE(NavigateToURL(url));
+
+ scoped_refptr<TabProxy> tab(browser->GetTab(0));
+ ASSERT_TRUE(tab.get());
+
+ ASSERT_TRUE(tab->LoadBlockedPlugins());
+
+ UITest::WaitForFinish("setup", "1", url, "status", "OK",
+ TestTimeouts::action_max_timeout_ms());
+
+ ASSERT_TRUE(tab->ExecuteJavaScript("window.inject()"));
+
+ UITest::WaitForFinish("setup", "2", url, "status", "OK",
+ TestTimeouts::action_max_timeout_ms());
+}
+
#if defined(OS_WIN)
// Flaky on Windows, see http://crbug.com/113057
#define MAYBE_FlashDocument DISABLED_FlashDocument