| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/rand_util.h" | 5 #include "base/rand_util.h" |
| 6 #include "chrome/browser/profiles/profile.h" | 6 #include "chrome/browser/profiles/profile.h" |
| 7 #include "chrome/browser/sync/profile_sync_service_harness.h" | 7 #include "chrome/browser/sync/profile_sync_service_harness.h" |
| 8 #include "chrome/browser/sync/test/live_sync/bookmarks_helper.h" | 8 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" |
| 9 #include "chrome/browser/sync/test/live_sync/live_sync_test.h" | 9 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 10 | 10 |
| 11 using bookmarks_helper::AddFolder; | 11 using bookmarks_helper::AddFolder; |
| 12 using bookmarks_helper::AddURL; | 12 using bookmarks_helper::AddURL; |
| 13 using bookmarks_helper::AllModelsMatch; | 13 using bookmarks_helper::AllModelsMatch; |
| 14 using bookmarks_helper::AllModelsMatchVerifier; | 14 using bookmarks_helper::AllModelsMatchVerifier; |
| 15 using bookmarks_helper::ContainsDuplicateBookmarks; | 15 using bookmarks_helper::ContainsDuplicateBookmarks; |
| 16 using bookmarks_helper::CountBookmarksWithTitlesMatching; | 16 using bookmarks_helper::CountBookmarksWithTitlesMatching; |
| 17 using bookmarks_helper::CreateFavicon; | 17 using bookmarks_helper::CreateFavicon; |
| 18 using bookmarks_helper::GetBookmarkBarNode; | 18 using bookmarks_helper::GetBookmarkBarNode; |
| 19 using bookmarks_helper::GetOtherNode; | 19 using bookmarks_helper::GetOtherNode; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 30 using bookmarks_helper::SetTitle; | 30 using bookmarks_helper::SetTitle; |
| 31 using bookmarks_helper::SetURL; | 31 using bookmarks_helper::SetURL; |
| 32 using bookmarks_helper::SortChildren; | 32 using bookmarks_helper::SortChildren; |
| 33 | 33 |
| 34 const std::string kGenericURL = "http://www.host.ext:1234/path/filename"; | 34 const std::string kGenericURL = "http://www.host.ext:1234/path/filename"; |
| 35 const std::wstring kGenericURLTitle = L"URL Title"; | 35 const std::wstring kGenericURLTitle = L"URL Title"; |
| 36 const std::wstring kGenericFolderName = L"Folder Name"; | 36 const std::wstring kGenericFolderName = L"Folder Name"; |
| 37 const std::wstring kGenericSubfolderName = L"Subfolder Name"; | 37 const std::wstring kGenericSubfolderName = L"Subfolder Name"; |
| 38 const std::wstring kGenericSubsubfolderName = L"Subsubfolder Name"; | 38 const std::wstring kGenericSubsubfolderName = L"Subsubfolder Name"; |
| 39 | 39 |
| 40 class TwoClientBookmarksSyncTest : public LiveSyncTest { | 40 class TwoClientBookmarksSyncTest : public SyncTest { |
| 41 public: | 41 public: |
| 42 TwoClientBookmarksSyncTest() : LiveSyncTest(TWO_CLIENT) {} | 42 TwoClientBookmarksSyncTest() : SyncTest(TWO_CLIENT) {} |
| 43 virtual ~TwoClientBookmarksSyncTest() {} | 43 virtual ~TwoClientBookmarksSyncTest() {} |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 DISALLOW_COPY_AND_ASSIGN(TwoClientBookmarksSyncTest); | 46 DISALLOW_COPY_AND_ASSIGN(TwoClientBookmarksSyncTest); |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 const std::vector<unsigned char> GenericFavicon() { | 49 const std::vector<unsigned char> GenericFavicon() { |
| 50 return CreateFavicon(254); | 50 return CreateFavicon(254); |
| 51 } | 51 } |
| 52 | 52 |
| (...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1748 | 1748 |
| 1749 ASSERT_TRUE(AddURL(0, IndexedURLTitle(1), GURL(IndexedURL(1))) != NULL); | 1749 ASSERT_TRUE(AddURL(0, IndexedURLTitle(1), GURL(IndexedURL(1))) != NULL); |
| 1750 ASSERT_TRUE(AddFolder(0, IndexedFolderName(0)) != NULL); | 1750 ASSERT_TRUE(AddFolder(0, IndexedFolderName(0)) != NULL); |
| 1751 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 1751 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 1752 ASSERT_TRUE(AllModelsMatchVerifier()); | 1752 ASSERT_TRUE(AllModelsMatchVerifier()); |
| 1753 } | 1753 } |
| 1754 | 1754 |
| 1755 // TODO(zea): Add first time sync functionality testing. In particular, when | 1755 // TODO(zea): Add first time sync functionality testing. In particular, when |
| 1756 // there are encrypted types in first time sync we need to ensure we don't | 1756 // there are encrypted types in first time sync we need to ensure we don't |
| 1757 // duplicate bookmarks. | 1757 // duplicate bookmarks. |
| OLD | NEW |