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

Unified Diff: chrome/browser/printing/print_preview_dialog_controller_browsertest.cc

Issue 2518493002: Remove obsolete plugin state handling code. (Closed)
Patch Set: Removed unusued function. Created 4 years, 1 month 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/plugins/plugin_prefs_unittest.cc ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_preview_dialog_controller_browsertest.cc
diff --git a/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc b/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc
index 598a121a912ac3ce0591566a8938ef2e9e84cc6a..c481d12066a6a251e6f348d7e299ceb354ff2b90 100644
--- a/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc
+++ b/chrome/browser/printing/print_preview_dialog_controller_browsertest.cc
@@ -180,6 +180,11 @@ class PrintPreviewDialogControllerBrowserTest : public InProcessBrowserTest {
return dialog_controller->GetPrintPreviewForContents(initiator_);
}
+ void SetAlwaysOpenPdfExternallyForTests(bool always_open_pdf_externally) {
+ PluginPrefs::GetForProfile(browser()->profile())
+ ->SetAlwaysOpenPdfExternallyForTests(always_open_pdf_externally);
+ }
+
private:
void SetUpOnMainThread() override {
WebContents* first_tab =
@@ -292,14 +297,7 @@ IN_PROC_BROWSER_TEST_F(PrintPreviewDialogControllerBrowserTest,
ASSERT_TRUE(GetPdfPluginInfo(&pdf_plugin_info));
// Disable the PDF plugin.
- {
- base::RunLoop run_loop;
- PluginPrefs::GetForProfile(browser()->profile())->EnablePlugin(
- false,
- base::FilePath::FromUTF8Unsafe(ChromeContentClient::kPDFPluginPath),
- base::Bind(&PluginEnabledCallback, run_loop.QuitClosure()));
- run_loop.Run();
- }
+ SetAlwaysOpenPdfExternallyForTests(true);
// Make sure it is actually disabled for webpages.
ChromePluginServiceFilter* filter = ChromePluginServiceFilter::GetInstance();
« no previous file with comments | « chrome/browser/plugins/plugin_prefs_unittest.cc ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698