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

Unified Diff: chrome/browser/sync/test/integration/sync_test.cc

Issue 7780031: Fix sync test crashing when multiprofiles are enabled on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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/sync/test/integration/sync_test.cc
===================================================================
--- chrome/browser/sync/test/integration/sync_test.cc (revision 100650)
+++ chrome/browser/sync/test/integration/sync_test.cc (working copy)
@@ -231,7 +231,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* SyncTest::GetProfile(int index) {
@@ -259,9 +261,9 @@
}
Profile* SyncTest::verifier() {
- if (verifier_.get() == NULL)
+ if (verifier_ == NULL)
LOG(FATAL) << "SetupClients() has not yet been called.";
- return verifier_.get();
+ return verifier_;
}
void SyncTest::DisableVerifier() {
@@ -295,9 +297,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 SyncTest::SetupSync() {
@@ -324,10 +326,7 @@
// All browsers should be closed at this point, or else we could see memory
// corruption in QuitBrowser().
CHECK_EQ(0U, BrowserList::size());
-
- profiles_.reset();
clients_.reset();
- verifier_.reset(NULL);
}
void SyncTest::SetUpInProcessBrowserTestFixture() {

Powered by Google App Engine
This is Rietveld 408576698