diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-27 02:34:25 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-27 02:34:25 +0000 |
commit | 672b2c6ff842345b062d2227584d955ab74b5c8d (patch) | |
tree | 0f511be9090f23b28fca98e1d0a19f114a926d2b /chrome/browser/plugin_prefs_unittest.cc | |
parent | dfce80004a4c06798e509e87258a511e33710860 (diff) | |
download | chromium_src-672b2c6ff842345b062d2227584d955ab74b5c8d.zip chromium_src-672b2c6ff842345b062d2227584d955ab74b5c8d.tar.gz chromium_src-672b2c6ff842345b062d2227584d955ab74b5c8d.tar.bz2 |
Return success value from PluginPrefs::EnablePlugin.
BUG=97179
TEST=chrome/test/functional/enterprise.py
Review URL: http://codereview.chromium.org/7976005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102863 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_prefs_unittest.cc')
-rw-r--r-- | chrome/browser/plugin_prefs_unittest.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/plugin_prefs_unittest.cc b/chrome/browser/plugin_prefs_unittest.cc index 934d478..6ee2317 100644 --- a/chrome/browser/plugin_prefs_unittest.cc +++ b/chrome/browser/plugin_prefs_unittest.cc @@ -9,6 +9,7 @@ #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile_manager.h" #include "testing/gtest/include/gtest/gtest.h" +#include "webkit/plugins/npapi/mock_plugin_list.cc" #include "webkit/plugins/webplugininfo.h" class PluginPrefsTest : public ::testing::Test { @@ -148,7 +149,10 @@ TEST_F(PluginPrefsTest, DisableGlobally) { FilePath(FILE_PATH_LITERAL("/path/too/foo")), ASCIIToUTF16("1.0.0"), ASCIIToUTF16("Foo plug-in")); - PluginPrefs::EnablePluginGlobally(false, plugin.path); + webkit::npapi::MockPluginList plugin_list(NULL, 0); + plugin_list.AddPluginToLoad(plugin); + plugin_prefs->SetPluginListForTesting(&plugin_list); + EXPECT_TRUE(PluginPrefs::EnablePluginGlobally(false, plugin.path)); EXPECT_FALSE(plugin_prefs->IsPluginEnabled(plugin)); @@ -156,5 +160,6 @@ TEST_F(PluginPrefsTest, DisableGlobally) { profile_manager.CreateTestingProfile("Profile 2"); PluginPrefs* plugin_prefs_2 = PluginPrefs::GetForTestingProfile(profile_2); ASSERT_TRUE(plugin_prefs); + plugin_prefs_2->SetPluginListForTesting(&plugin_list); EXPECT_FALSE(plugin_prefs_2->IsPluginEnabled(plugin)); } |