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 "chrome/browser/profiles/profile.h" | 5 #include "chrome/browser/profiles/profile.h" |
6 #include "chrome/browser/sync/profile_sync_service_harness.h" | 6 #include "chrome/browser/sync/profile_sync_service_harness.h" |
7 #include "chrome/browser/sync/test/live_sync/bookmarks_helper.h" | 7 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" |
8 #include "chrome/browser/sync/test/live_sync/live_sync_test.h" | 8 #include "chrome/browser/sync/test/integration/sync_test.h" |
9 | 9 |
10 using bookmarks_helper::AddFolder; | 10 using bookmarks_helper::AddFolder; |
11 using bookmarks_helper::AddURL; | 11 using bookmarks_helper::AddURL; |
12 using bookmarks_helper::GetBookmarkBarNode; | 12 using bookmarks_helper::GetBookmarkBarNode; |
13 using bookmarks_helper::GetOtherNode; | 13 using bookmarks_helper::GetOtherNode; |
14 using bookmarks_helper::ModelMatchesVerifier; | 14 using bookmarks_helper::ModelMatchesVerifier; |
15 using bookmarks_helper::Move; | 15 using bookmarks_helper::Move; |
16 using bookmarks_helper::Remove; | 16 using bookmarks_helper::Remove; |
17 using bookmarks_helper::SetTitle; | 17 using bookmarks_helper::SetTitle; |
18 | 18 |
19 class SingleClientBookmarksSyncTest : public LiveSyncTest { | 19 class SingleClientBookmarksSyncTest : public SyncTest { |
20 public: | 20 public: |
21 SingleClientBookmarksSyncTest() : LiveSyncTest(SINGLE_CLIENT) {} | 21 SingleClientBookmarksSyncTest() : SyncTest(SINGLE_CLIENT) {} |
22 virtual ~SingleClientBookmarksSyncTest() {} | 22 virtual ~SingleClientBookmarksSyncTest() {} |
23 | 23 |
24 private: | 24 private: |
25 DISALLOW_COPY_AND_ASSIGN(SingleClientBookmarksSyncTest); | 25 DISALLOW_COPY_AND_ASSIGN(SingleClientBookmarksSyncTest); |
26 }; | 26 }; |
27 | 27 |
28 IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, OfflineToOnline) { | 28 IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, OfflineToOnline) { |
29 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 29 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
30 | 30 |
31 DisableNetwork(GetProfile(0)); | 31 DisableNetwork(GetProfile(0)); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 0, tier1_a, 0, L"Toronto Maple Leafs", GURL("http://mapleleafs.nhl.com")); | 141 0, tier1_a, 0, L"Toronto Maple Leafs", GURL("http://mapleleafs.nhl.com")); |
142 const BookmarkNode* wynn = AddURL(0, bar, 1, L"Wynn", | 142 const BookmarkNode* wynn = AddURL(0, bar, 1, L"Wynn", |
143 GURL("http://www.wynnlasvegas.com")); | 143 GURL("http://www.wynnlasvegas.com")); |
144 | 144 |
145 Move(0, wynn, tier3_b, 0); | 145 Move(0, wynn, tier3_b, 0); |
146 Move(0, leafs, tier3_b, 0); | 146 Move(0, leafs, tier3_b, 0); |
147 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion( | 147 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion( |
148 "Move after addition of bookmarks.")); | 148 "Move after addition of bookmarks.")); |
149 ASSERT_TRUE(ModelMatchesVerifier(0)); | 149 ASSERT_TRUE(ModelMatchesVerifier(0)); |
150 } | 150 } |
OLD | NEW |