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

Unified Diff: chrome/browser/renderer_host/plugin_info_message_filter_unittest.cc

Issue 19706002: Remove plugin_list.h includes from chrome tests in preparation for moving webkit/plugins to content… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix posix tests Created 7 years, 5 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
Index: chrome/browser/renderer_host/plugin_info_message_filter_unittest.cc
===================================================================
--- chrome/browser/renderer_host/plugin_info_message_filter_unittest.cc (revision 212185)
+++ chrome/browser/renderer_host/plugin_info_message_filter_unittest.cc (working copy)
@@ -13,11 +13,14 @@
#include "chrome/common/render_messages.h"
#include "content/public/browser/plugin_service.h"
#include "content/public/browser/plugin_service_filter.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/plugins/npapi/mock_plugin_list.h"
+// Linux Aura doesn't support NPAPI.
+#if !(defined(OS_LINUX) && defined(USE_AURA))
+
using content::PluginService;
namespace {
@@ -83,7 +86,8 @@
webkit::WebPluginMimeType mimeType;
mimeType.mime_type = "foo/bar";
foo_plugin.mime_types.push_back(mimeType);
- plugin_list_.AddPluginToLoad(foo_plugin);
+ PluginService::GetInstance()->Init();
+ PluginService::GetInstance()->RegisterInternalPlugin(foo_plugin, false);
webkit::WebPluginInfo bar_plugin(ASCIIToUTF16("Bar Plug-in"),
bar_plugin_path_,
@@ -91,16 +95,22 @@
ASCIIToUTF16("The Bar plug-in."));
mimeType.mime_type = "foo/bar";
bar_plugin.mime_types.push_back(mimeType);
- plugin_list_.AddPluginToLoad(bar_plugin);
+ PluginService::GetInstance()->RegisterInternalPlugin(bar_plugin, false);
- PluginService::GetInstance()->SetPluginListForTesting(&plugin_list_);
PluginService::GetInstance()->SetFilter(&filter_);
+#if !defined(OS_WIN)
+ // Can't go out of process in unit tests.
+ content::RenderProcessHost::SetRunRendererInProcess(true);
+#endif
PluginService::GetInstance()->GetPlugins(
base::Bind(&PluginInfoMessageFilterTest::PluginsLoaded,
base::Unretained(this)));
base::RunLoop run_loop;
run_loop.Run();
+#if !defined(OS_WIN)
+ content::RenderProcessHost::SetRunRendererInProcess(false);
+#endif
}
protected:
@@ -119,7 +129,6 @@
// a MockPluginList.
content::TestBrowserThread file_thread_;
base::ShadowingAtExitManager at_exit_manager_; // Destroys the PluginService.
- webkit::npapi::MockPluginList plugin_list_;
};
TEST_F(PluginInfoMessageFilterTest, FindEnabledPlugin) {
@@ -172,3 +181,5 @@
EXPECT_EQ(FILE_PATH_LITERAL(""), plugin.path.value());
}
}
+
+#endif
« no previous file with comments | « chrome/browser/printing/print_preview_test.cc ('k') | chrome/browser/ui/webui/print_preview/print_preview_ui_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698