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

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

Issue 11364202: Get full WebPluginInfo for the PDF plug-in before enabling it for print preview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix? Created 8 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
Index: chrome/browser/printing/print_preview_tab_controller_unittest.cc
diff --git a/chrome/browser/printing/print_preview_tab_controller_unittest.cc b/chrome/browser/printing/print_preview_tab_controller_unittest.cc
index e16e46bb9e6808c641a8a956b30b4746451e2447..7113bd53e5a1a4e37bb3ae9acc254628732c51f5 100644
--- a/chrome/browser/printing/print_preview_tab_controller_unittest.cc
+++ b/chrome/browser/printing/print_preview_tab_controller_unittest.cc
@@ -16,7 +16,9 @@
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/plugin_service.h"
#include "content/public/common/url_constants.h"
+#include "webkit/plugins/npapi/mock_plugin_list.h"
// Test crashes on Aura due to initiator tab's native view having no parent.
// http://crbug.com/104284
@@ -39,8 +41,16 @@ class PrintPreviewTabControllerUnitTest : public BrowserWithTestWindowTest {
virtual void SetUp() OVERRIDE {
BrowserWithTestWindowTest::SetUp();
+ // The PluginService will be destroyed at the end of the test (due to the
+ // ShadowingAtExitManager in our base class).
+ content::PluginService::GetInstance()->SetPluginListForTesting(
+ &plugin_list_);
+
profile()->GetPrefs()->SetBoolean(prefs::kPrintPreviewDisabled, false);
}
+
+ private:
+ webkit::npapi::MockPluginList plugin_list_;
};
// Create/Get a preview tab for initiator tab.

Powered by Google App Engine
This is Rietveld 408576698