Index: chrome/test/in_process_browser_test.cc |
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc |
index 80c0ce93467771862ea8749ac57e46969ab8ede1..3f4ce3909bbfd2d25f8f48ff59ccf1cabba16333 100644 |
--- a/chrome/test/in_process_browser_test.cc |
+++ b/chrome/test/in_process_browser_test.cc |
@@ -63,6 +63,9 @@ extern int BrowserMain(const MainFunctionParams&); |
const wchar_t kUnitTestShowWindows[] = L"show-windows"; |
+// Passed as value of kTestType. |
+static const char kBrowserTestType[] = "browser"; |
+ |
// Default delay for the time-out at which we stop the |
// inner-message loop the first time. |
const int kInitialTimeoutInMS = 30000; |
@@ -132,6 +135,10 @@ void InProcessBrowserTest::SetUp() { |
// Don't show the first run ui. |
command_line->AppendSwitch(switches::kNoFirstRun); |
+ // This is a Browser test. |
+ command_line->AppendSwitchWithValue(switches::kTestType, |
+ ASCIIToWide(kBrowserTestType)); |
+ |
// Single-process mode is not set in BrowserMain so it needs to be processed |
// explicitlty. |
original_single_process_ = RenderProcessHost::run_renderer_in_process(); |
@@ -244,10 +251,7 @@ void InProcessBrowserTest::RunTestOnMainThreadLoop() { |
// In the long term it would be great if we could use a TestingProfile |
// here and only enable services you want tested, but that requires all |
// consumers of Profile to handle NULL services. |
- FilePath user_data_dir; |
- PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); |
- ProfileManager* profile_manager = g_browser_process->profile_manager(); |
- Profile* profile = profile_manager->GetDefaultProfile(user_data_dir); |
+ Profile* profile = ProfileManager::GetDefaultProfile(); |
if (!profile) { |
// We should only be able to get here if the profile already exists and |
// has been created. |