diff options
author | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-28 18:56:04 +0000 |
---|---|---|
committer | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-28 18:56:04 +0000 |
commit | 27c89837d626b1a5910cae92babfe4ea514d5996 (patch) | |
tree | 264e50d5c61cba5abd2966e9894b7768db562fea | |
parent | 57cacdcb68145bce3b1eaaa7c8c36706fec8ccca (diff) | |
download | chromium_src-27c89837d626b1a5910cae92babfe4ea514d5996.zip chromium_src-27c89837d626b1a5910cae92babfe4ea514d5996.tar.gz chromium_src-27c89837d626b1a5910cae92babfe4ea514d5996.tar.bz2 |
Fix second-profile dir so that it's a sibling of the first; eliminate a FromWStringHack.
TEST=sync_integration_tests fail less.
BUG=42642
Review URL: http://codereview.chromium.org/1803001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45839 0039d316-1c4b-4281-b951-d872f2087c98
6 files changed, 15 insertions, 12 deletions
diff --git a/chrome/test/live_sync/bookmark_model_verifier.cc b/chrome/test/live_sync/bookmark_model_verifier.cc index f997962..5f5b718 100644 --- a/chrome/test/live_sync/bookmark_model_verifier.cc +++ b/chrome/test/live_sync/bookmark_model_verifier.cc @@ -29,7 +29,8 @@ void BookmarkModelVerifier::ExpectBookmarkInfoMatch( } BookmarkModelVerifier::BookmarkModelVerifier() { - verifier_profile_.reset(LiveSyncTest::MakeProfile(L"verifier")); + verifier_profile_.reset(LiveSyncTest::MakeProfile( + FILE_PATH_LITERAL("verifier"))); verifier_ = verifier_profile_->GetBookmarkModel(); } diff --git a/chrome/test/live_sync/live_sync_test.cc b/chrome/test/live_sync/live_sync_test.cc index 8759106..3fc7104 100644 --- a/chrome/test/live_sync/live_sync_test.cc +++ b/chrome/test/live_sync/live_sync_test.cc @@ -80,11 +80,11 @@ const BookmarkNode* LiveSyncTest::GetByUniqueURL(BookmarkModel* m, } // static -Profile* LiveSyncTest::MakeProfile(const std::wstring& name) { +Profile* LiveSyncTest::MakeProfile(const FilePath::CharType* name) { FilePath path; PathService::Get(chrome::DIR_USER_DATA, &path); - path.Append(FilePath::FromWStringHack(name)); - return ProfileManager::CreateProfile(path); + + return ProfileManager::CreateProfile(path.Append(name)); } void LiveSyncTest::SetUpInProcessBrowserTestFixture() { diff --git a/chrome/test/live_sync/live_sync_test.h b/chrome/test/live_sync/live_sync_test.h index 43975f6..9fd3373 100644 --- a/chrome/test/live_sync/live_sync_test.h +++ b/chrome/test/live_sync/live_sync_test.h @@ -58,7 +58,7 @@ class LiveSyncTest : public InProcessBrowserTest { static const BookmarkNode* GetByUniqueURL(BookmarkModel* m, const GURL& url); // Helper to ProfileManager::CreateProfile that handles path creation. - static Profile* MakeProfile(const std::wstring& name); + static Profile* MakeProfile(const FilePath::CharType* name); // Utility to block (by running the current MessageLoop) until the model has // loaded. Note this is required instead of using m->BlockTillLoaded, as that diff --git a/chrome/test/live_sync/single_client_live_preferences_sync_unittest.cc b/chrome/test/live_sync/single_client_live_preferences_sync_unittest.cc index 8e0da62..6c3c181 100644 --- a/chrome/test/live_sync/single_client_live_preferences_sync_unittest.cc +++ b/chrome/test/live_sync/single_client_live_preferences_sync_unittest.cc @@ -42,7 +42,8 @@ class SingleClientLivePreferencesSyncTest : public LiveSyncTest { IN_PROC_BROWSER_TEST_F(SingleClientLivePreferencesSyncTest, Sanity) { SetupSync(); - PrefService* expected = LiveSyncTest::MakeProfile(L"verifier")->GetPrefs(); + PrefService* expected = LiveSyncTest::MakeProfile( + FILE_PATH_LITERAL("verifier"))->GetPrefs(); expected->SetBoolean(prefs::kHomePageIsNewTabPage, true); prefs()->SetBoolean(prefs::kHomePageIsNewTabPage, true); diff --git a/chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc b/chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc index bfae3c7..03691b0 100644 --- a/chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc +++ b/chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc @@ -36,7 +36,7 @@ class TwoClientLiveBookmarksSyncTest : public LiveSyncTest { } virtual ~TwoClientLiveBookmarksSyncTest() {} bool SetupSync() { - profile2_.reset(MakeProfile(L"client2")); + profile2_.reset(MakeProfile(FILE_PATH_LITERAL("client2"))); client1_.reset(new ProfileSyncServiceTestHarness( browser()->profile(), username_, password_)); client2_.reset(new ProfileSyncServiceTestHarness( @@ -2361,7 +2361,7 @@ IN_PROC_BROWSER_TEST_F(LiveSyncTestBasicHierarchy50BMBothClients, // Test Scribe ID - 373508. IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest, MC_SimpleMergeOfDifferentBMModels) { - set_profile2(MakeProfile(L"client2")); + set_profile2(MakeProfile(FILE_PATH_LITERAL("client2"))); BookmarkModel* model_one = browser()->profile()->GetBookmarkModel(); BookmarkModel* model_two = profile2()->GetBookmarkModel(); LiveSyncTest::BlockUntilLoaded(model_two); @@ -2430,7 +2430,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest, // Test Scribe ID - 386586. IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest, MC_MergeSimpleBMHierarchyUnderBMBar) { - set_profile2(MakeProfile(L"client2")); + set_profile2(MakeProfile(FILE_PATH_LITERAL("client2"))); BookmarkModel* model_one = browser()->profile()->GetBookmarkModel(); BookmarkModel* model_two = profile2()->GetBookmarkModel(); LiveSyncTest::BlockUntilLoaded(model_two); @@ -2487,7 +2487,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest, // Test Scribe ID - 386589. IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest, MC_MergeSimpleBMHierarchyEqualSetsUnderBMBar) { - set_profile2(MakeProfile(L"client2")); + set_profile2(MakeProfile(FILE_PATH_LITERAL("client2"))); BookmarkModel* model_one = browser()->profile()->GetBookmarkModel(); BookmarkModel* model_two = profile2()->GetBookmarkModel(); LiveSyncTest::BlockUntilLoaded(model_two); diff --git a/chrome/test/live_sync/two_client_live_preferences_sync_test.cc b/chrome/test/live_sync/two_client_live_preferences_sync_test.cc index 2a587bc..04b4ee4 100644 --- a/chrome/test/live_sync/two_client_live_preferences_sync_test.cc +++ b/chrome/test/live_sync/two_client_live_preferences_sync_test.cc @@ -24,7 +24,7 @@ class TwoClientLivePreferencesSyncTest : public LiveSyncTest { void SetupSync() { client1_.reset(new ProfileSyncServiceTestHarness( browser()->profile(), username_, password_)); - profile2_.reset(MakeProfile(L"client2")); + profile2_.reset(MakeProfile(FILE_PATH_LITERAL("client2"))); client2_.reset(new ProfileSyncServiceTestHarness( profile2_.get(), username_, password_)); EXPECT_TRUE(client1_->SetupSync()); @@ -58,7 +58,8 @@ IN_PROC_BROWSER_TEST_F(TwoClientLivePreferencesSyncTest, Sanity) { EXPECT_EQ(false, prefs1()->GetBoolean(prefs::kHomePageIsNewTabPage)); EXPECT_EQ(false, prefs2()->GetBoolean(prefs::kHomePageIsNewTabPage)); - PrefService* expected = LiveSyncTest::MakeProfile(L"verifier")->GetPrefs(); + PrefService* expected = LiveSyncTest::MakeProfile( + FILE_PATH_LITERAL("verifier"))->GetPrefs(); expected->SetBoolean(prefs::kHomePageIsNewTabPage, true); prefs1()->SetBoolean(prefs::kHomePageIsNewTabPage, true); |