Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: webkit/plugins/npapi/plugin_group_unittest.cc

Issue 5699005: Policy: Re-enabled plugin still disabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit tests. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/plugins/npapi/plugin_group_unittest.cc
diff --git a/webkit/plugins/npapi/plugin_group_unittest.cc b/webkit/plugins/npapi/plugin_group_unittest.cc
index 6fc3db20c3ecb84babdd4d179b2e0f8b28ed7107..19420ee41f11befcd3993f2fc669b0df9d9a776e 100644
--- a/webkit/plugins/npapi/plugin_group_unittest.cc
+++ b/webkit/plugins/npapi/plugin_group_unittest.cc
@@ -138,26 +138,10 @@ TEST(PluginGroupTest, PluginGroupDescription) {
EXPECT_EQ(desc3043, group->description());
EXPECT_TRUE(group->IsVulnerable());
}
-
- {
- // Disable the first plugin.
- plugin3043.enabled = false;
- scoped_ptr<PluginGroup> group(PluginGroupTest::CreatePluginGroup(
- plugindefs[i]));
- EXPECT_TRUE(group->Match(plugin3043));
- group->AddPlugin(plugin3043, 0);
- EXPECT_EQ(desc3043, group->description());
- EXPECT_TRUE(group->IsVulnerable());
- EXPECT_FALSE(group->Enabled());
- EXPECT_TRUE(group->Match(plugin3045));
- group->AddPlugin(plugin3045, 1);
- EXPECT_EQ(desc3045, group->description());
- EXPECT_FALSE(group->IsVulnerable());
- }
-
{
// Disable the second plugin.
- plugin3045.enabled = false;
+ plugin3045.enabled =
+ webkit::npapi::WebPluginInfo::USER_DISABLED_POLICY_UNMANAGED;
scoped_ptr<PluginGroup> group(PluginGroupTest::CreatePluginGroup(
plugindefs[i]));
EXPECT_TRUE(group->Match(plugin3043));
@@ -190,6 +174,7 @@ TEST(PluginGroupTest, DisableOutdated) {
plugindefs[i]));
group->AddPlugin(kPlugin3043, 0);
group->AddPlugin(kPlugin3045, 1);
+
EXPECT_EQ(ASCIIToUTF16("MyPlugin version 3.0.43"), group->description());
EXPECT_TRUE(group->IsVulnerable());

Powered by Google App Engine
This is Rietveld 408576698