OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/printing/print_preview_test.h" | 5 #include "chrome/browser/printing/print_preview_test.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
Lei Zhang
2014/08/20 00:01:15
Remove. Also pref_names.h below.
Vitaly Buka (NO REVIEWS)
2014/08/20 01:16:14
Done.
| |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_iterator.h" | 9 #include "chrome/browser/ui/browser_iterator.h" |
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
12 #include "chrome/test/base/test_browser_window.h" | 12 #include "chrome/test/base/test_browser_window.h" |
13 #include "components/web_modal/web_contents_modal_dialog_host.h" | 13 #include "components/web_modal/web_contents_modal_dialog_host.h" |
14 #include "content/public/browser/plugin_service.h" | 14 #include "content/public/browser/plugin_service.h" |
15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
16 | 16 |
17 using web_modal::WebContentsModalDialogHost; | 17 using web_modal::WebContentsModalDialogHost; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 PrintPreviewTest::PrintPreviewTest() {} | 72 PrintPreviewTest::PrintPreviewTest() {} |
73 PrintPreviewTest::~PrintPreviewTest() {} | 73 PrintPreviewTest::~PrintPreviewTest() {} |
74 | 74 |
75 void PrintPreviewTest::SetUp() { | 75 void PrintPreviewTest::SetUp() { |
76 BrowserWithTestWindowTest::SetUp(); | 76 BrowserWithTestWindowTest::SetUp(); |
77 | 77 |
78 // The PluginService will be destroyed at the end of the test (due to the | 78 // The PluginService will be destroyed at the end of the test (due to the |
79 // ShadowingAtExitManager in our base class). | 79 // ShadowingAtExitManager in our base class). |
80 content::PluginService::GetInstance()->Init(); | 80 content::PluginService::GetInstance()->Init(); |
81 content::PluginService::GetInstance()->DisablePluginsDiscoveryForTesting(); | 81 content::PluginService::GetInstance()->DisablePluginsDiscoveryForTesting(); |
82 | |
83 profile()->GetPrefs()->SetBoolean(prefs::kPrintPreviewDisabled, false); | |
84 } | 82 } |
85 | 83 |
86 BrowserWindow* PrintPreviewTest::CreateBrowserWindow() { | 84 BrowserWindow* PrintPreviewTest::CreateBrowserWindow() { |
87 return new PrintPreviewTestBrowserWindow; | 85 return new PrintPreviewTestBrowserWindow; |
88 } | 86 } |
OLD | NEW |