| 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();
|
|
|