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

Unified Diff: chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.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
Index: chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
===================================================================
--- chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc (revision 257432)
+++ chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc (working copy)
@@ -27,6 +27,7 @@
#include "chrome/common/service_process_util.h"
#include "chrome/service/service_ipc_server.h"
#include "chrome/service/service_process.h"
+#include "chrome/test/base/chrome_unit_test_suite.h"
#include "chrome/test/base/test_launcher_utils.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_io_thread_state.h"
@@ -36,6 +37,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "components/keyed_service/core/keyed_service.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/common/content_paths.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "ipc/ipc_descriptors.h"
#include "ipc/ipc_multiprocess_test.h"
@@ -211,6 +213,7 @@
base::MessageLoopForUI main_message_loop;
main_message_loop.set_thread_name("Main Thread");
CommandLine* command_line = CommandLine::ForCurrentProcess();
+ content::RegisterPathProvider();
#if defined(OS_MACOSX)
if (!command_line->HasSwitch(kTestExecutablePath))
@@ -371,6 +374,10 @@
CloudPrintProxyPolicyStartupTest::CloudPrintProxyPolicyStartupTest()
: thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD) {
+ // Although is really a unit test which runs in the browser_tests binary, it
+ // doesn't get the unit setup which normally happens in the unit test binary.
+ ChromeUnitTestSuite::InitializeProviders();
+ ChromeUnitTestSuite::InitializeResourceBundle();
}
CloudPrintProxyPolicyStartupTest::~CloudPrintProxyPolicyStartupTest() {

Powered by Google App Engine
This is Rietveld 408576698