Index: chrome/browser/plugins/plugin_prefs_unittest.cc |
diff --git a/chrome/browser/plugins/plugin_prefs_unittest.cc b/chrome/browser/plugins/plugin_prefs_unittest.cc |
index 411447e4ecbf681241d95ed3aef1694bce51a03f..51f1b16e64a2c6e62e7539024b6b79bbcae5f7c2 100644 |
--- a/chrome/browser/plugins/plugin_prefs_unittest.cc |
+++ b/chrome/browser/plugins/plugin_prefs_unittest.cc |
@@ -65,10 +65,14 @@ class PluginPrefsTest : public ::testing::Test { |
const std::set<base::string16>& disabled, |
const std::set<base::string16>& disabled_exceptions, |
const std::set<base::string16>& enabled) { |
- plugin_prefs_->SetPolicyEnforcedPluginPatterns( |
+ plugin_prefs_->SetPolicyEnforcedPluginPatternsForTests( |
disabled, disabled_exceptions, enabled); |
} |
+ void SetAlwaysOpenPdfExternally(bool value) { |
+ plugin_prefs_->SetAlwaysOpenPdfExternallyForTests(value); |
+ } |
+ |
protected: |
void EnablePluginSynchronously(bool enabled, |
const base::FilePath& path, |
@@ -285,3 +289,15 @@ TEST_F(PluginPrefsTest, UnifiedPepperFlashState) { |
} |
#endif |
+ |
+TEST_F(PluginPrefsTest, AlwaysOpenPdfExternally) { |
+ EXPECT_EQ(PluginPrefs::NO_POLICY, |
+ plugin_prefs_->PolicyStatusForPlugin( |
+ base::ASCIIToUTF16(ChromeContentClient::kPDFPluginName))); |
+ |
+ SetAlwaysOpenPdfExternally(true); |
+ |
+ EXPECT_EQ(PluginPrefs::POLICY_DISABLED, |
+ plugin_prefs_->PolicyStatusForPlugin( |
+ base::ASCIIToUTF16(ChromeContentClient::kPDFPluginName))); |
+} |