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

Unified Diff: chrome/browser/download/download_prefs_unittest.cc

Issue 2369353002: Adds a pref and a policy to decide if PDFs should always be opened externally. (Closed)
Patch Set: Remove changes leaked in from the dependent branch. Created 4 years, 2 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
« no previous file with comments | « chrome/browser/download/download_prefs.cc ('k') | chrome/browser/plugins/plugin_prefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_prefs_unittest.cc
diff --git a/chrome/browser/download/download_prefs_unittest.cc b/chrome/browser/download/download_prefs_unittest.cc
index 68406f6d03e5b0d18494be9f223c9bf740c9b1de..1e5dfe346350136fc6d74b56cd58362220181604 100644
--- a/chrome/browser/download/download_prefs_unittest.cc
+++ b/chrome/browser/download/download_prefs_unittest.cc
@@ -117,3 +117,18 @@ TEST(DownloadPrefsTest, AutoOpenCheckIsCaseInsensitive) {
EXPECT_TRUE(prefs.IsAutoOpenEnabledBasedOnExtension(
base::FilePath(FILE_PATH_LITERAL("x.Bar"))));
}
+
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
+TEST(DownloadPrefsTest, AlwaysOpenPdfExternally) {
+ content::TestBrowserThreadBundle threads_are_required_for_testing_profile;
+ TestingProfile profile;
+ profile.GetPrefs()->SetBoolean(prefs::kOpenPdfDownloadInSystemReader, false);
+ profile.GetPrefs()->SetBoolean(prefs::kPluginsAlwaysOpenPdfExternally, true);
+ DownloadPrefs prefs(&profile);
+ prefs.DisableAdobeVersionCheckForTests();
+
+ EXPECT_TRUE(prefs.ShouldOpenPdfInSystemReader());
+ EXPECT_TRUE(prefs.IsAutoOpenEnabledBasedOnExtension(
+ base::FilePath(FILE_PATH_LITERAL("doc.pdf"))));
+}
+#endif
« no previous file with comments | « chrome/browser/download/download_prefs.cc ('k') | chrome/browser/plugins/plugin_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698