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

Unified Diff: content/public/test/content_test_suite_base.cc

Issue 190663012: Run ContentMain in a browser_test's browser process. This removes duplication of code in the browse… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: try to fix android by restoring old path just for it Created 6 years, 9 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
« no previous file with comments | « content/public/test/content_test_suite_base.h ('k') | content/public/test/render_view_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/content_test_suite_base.cc
===================================================================
--- content/public/test/content_test_suite_base.cc (revision 257432)
+++ content/public/test/content_test_suite_base.cc (working copy)
@@ -16,7 +16,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/utility_process_host.h"
#include "content/public/common/content_client.h"
-#include "content/public/common/content_paths.h"
#include "content/renderer/in_process_renderer_thread.h"
#include "content/utility/in_process_utility_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -34,10 +33,6 @@
#include "ui/shell_dialogs/android/shell_dialogs_jni_registrar.h"
#endif
-#if !defined(OS_IOS)
-#include "media/base/media.h"
-#endif
-
namespace content {
class ContentTestSuiteBaseListener : public testing::EmptyTestEventListener {
@@ -52,8 +47,7 @@
};
ContentTestSuiteBase::ContentTestSuiteBase(int argc, char** argv)
- : base::TestSuite(argc, argv),
- external_libraries_enabled_(true) {
+ : base::TestSuite(argc, argv) {
}
void ContentTestSuiteBase::Initialize() {
@@ -71,26 +65,25 @@
ui::shell_dialogs::RegisterJni(env);
#endif
+ testing::UnitTest::GetInstance()->listeners().Append(
+ new ContentTestSuiteBaseListener);
+}
+
+void ContentTestSuiteBase::RegisterContentSchemes(
+ ContentClient* content_client) {
+ SetContentClient(content_client);
+ content::RegisterContentSchemes(false);
+ SetContentClient(NULL);
+}
+
+void ContentTestSuiteBase::RegisterInProcessThreads() {
#if !defined(OS_IOS)
UtilityProcessHost::RegisterUtilityMainThreadFactory(
CreateInProcessUtilityThread);
RenderProcessHost::RegisterRendererMainThreadFactory(
CreateInProcessRendererThread);
GpuProcessHost::RegisterGpuMainThreadFactory(CreateInProcessGpuThread);
- if (external_libraries_enabled_)
- media::InitializeMediaLibraryForTesting();
#endif
-
- scoped_ptr<ContentClient> client_for_init(CreateClientForInitialization());
- SetContentClient(client_for_init.get());
- RegisterContentSchemes(false);
- SetContentClient(NULL);
-
- RegisterPathProvider();
- ui::RegisterPathProvider();
-
- testing::UnitTest::GetInstance()->listeners().Append(
- new ContentTestSuiteBaseListener);
}
} // namespace content
« no previous file with comments | « content/public/test/content_test_suite_base.h ('k') | content/public/test/render_view_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698