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

Unified Diff: chrome/test/in_process_browser_test.cc

Issue 1094009: Ensure that data doesn't leak between users on cros chrome crash. (Closed)
Patch Set: Make tests not use OTR Profile Created 10 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 | « chrome/common/chrome_switches.cc ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698