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

Unified Diff: chrome/test/live_sync/live_sync_test.cc

Issue 7621066: Fix sync test crashing when multiprofiles are enabled on Mac. Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/test/live_sync/live_sync_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/live_sync/live_sync_test.cc
===================================================================
--- chrome/test/live_sync/live_sync_test.cc (revision 97284)
+++ chrome/test/live_sync/live_sync_test.cc (working copy)
@@ -226,7 +226,9 @@
if (!file_util::PathExists(path))
CHECK(file_util::CreateDirectory(path));
- return Profile::CreateProfile(path);
+ Profile* profile = Profile::CreateProfile(path);
+ g_browser_process->profile_manager()->RegisterTestingProfile(profile, true);
+ return profile;
}
Profile* LiveSyncTest::GetProfile(int index) {
@@ -246,9 +248,9 @@
}
Profile* LiveSyncTest::verifier() {
- if (verifier_.get() == NULL)
+ if (verifier_ == NULL)
LOG(FATAL) << "SetupClients() has not yet been called.";
- return verifier_.get();
+ return verifier_;
}
void LiveSyncTest::DisableVerifier() {
@@ -277,9 +279,9 @@
}
// Create the verifier profile.
- verifier_.reset(MakeProfile(FILE_PATH_LITERAL("Verifier")));
+ verifier_ = MakeProfile(FILE_PATH_LITERAL("Verifier"));
ui_test_utils::WaitForBookmarkModelToLoad(verifier()->GetBookmarkModel());
- return (verifier_.get() != NULL);
+ return (verifier_ != NULL);
}
bool LiveSyncTest::SetupSync() {
@@ -299,9 +301,7 @@
}
void LiveSyncTest::CleanUpOnMainThread() {
- profiles_.reset();
clients_.reset();
- verifier_.reset(NULL);
}
void LiveSyncTest::SetUpInProcessBrowserTestFixture() {
« no previous file with comments | « chrome/test/live_sync/live_sync_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698