| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/strings/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
| 6 #include "chrome/browser/profiles/profile.h" | 6 #include "chrome/browser/profiles/profile.h" |
| 7 #include "chrome/browser/sync/profile_sync_service.h" | 7 #include "chrome/browser/sync/profile_sync_service.h" |
| 8 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" | 8 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" |
| 9 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" | 9 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" |
| 10 #include "chrome/browser/sync/test/integration/sync_test.h" | 10 #include "chrome/browser/sync/test/integration/sync_test.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 using bookmarks_helper::Move; | 25 using bookmarks_helper::Move; |
| 26 using bookmarks_helper::Remove; | 26 using bookmarks_helper::Remove; |
| 27 using bookmarks_helper::RemoveAll; | 27 using bookmarks_helper::RemoveAll; |
| 28 using bookmarks_helper::SetFavicon; | 28 using bookmarks_helper::SetFavicon; |
| 29 using bookmarks_helper::SetTitle; | 29 using bookmarks_helper::SetTitle; |
| 30 using sync_integration_test_util::AwaitCommitActivityCompletion; | 30 using sync_integration_test_util::AwaitCommitActivityCompletion; |
| 31 | 31 |
| 32 class SingleClientBookmarksSyncTest : public SyncTest { | 32 class SingleClientBookmarksSyncTest : public SyncTest { |
| 33 public: | 33 public: |
| 34 SingleClientBookmarksSyncTest() : SyncTest(SINGLE_CLIENT) {} | 34 SingleClientBookmarksSyncTest() : SyncTest(SINGLE_CLIENT) {} |
| 35 virtual ~SingleClientBookmarksSyncTest() {} | 35 ~SingleClientBookmarksSyncTest() override {} |
| 36 | 36 |
| 37 // Verify that the local bookmark model (for the Profile corresponding to | 37 // Verify that the local bookmark model (for the Profile corresponding to |
| 38 // |index|) matches the data on the FakeServer. It is assumed that FakeServer | 38 // |index|) matches the data on the FakeServer. It is assumed that FakeServer |
| 39 // is being used and each bookmark has a unique title. Folders are not | 39 // is being used and each bookmark has a unique title. Folders are not |
| 40 // verified. | 40 // verified. |
| 41 void VerifyBookmarkModelMatchesFakeServer(int index); | 41 void VerifyBookmarkModelMatchesFakeServer(int index); |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 DISALLOW_COPY_AND_ASSIGN(SingleClientBookmarksSyncTest); | 44 DISALLOW_COPY_AND_ASSIGN(SingleClientBookmarksSyncTest); |
| 45 }; | 45 }; |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 285 |
| 286 // Remove all bookmarks and wait for sync completion. | 286 // Remove all bookmarks and wait for sync completion. |
| 287 RemoveAll(0); | 287 RemoveAll(0); |
| 288 ASSERT_TRUE(AwaitCommitActivityCompletion(GetSyncService((0)))); | 288 ASSERT_TRUE(AwaitCommitActivityCompletion(GetSyncService((0)))); |
| 289 // Verify other node has no children now. | 289 // Verify other node has no children now. |
| 290 EXPECT_EQ(0, GetOtherNode(0)->child_count()); | 290 EXPECT_EQ(0, GetOtherNode(0)->child_count()); |
| 291 EXPECT_EQ(0, GetBookmarkBarNode(0)->child_count()); | 291 EXPECT_EQ(0, GetBookmarkBarNode(0)->child_count()); |
| 292 // Verify model matches verifier. | 292 // Verify model matches verifier. |
| 293 ASSERT_TRUE(ModelMatchesVerifier(0)); | 293 ASSERT_TRUE(ModelMatchesVerifier(0)); |
| 294 } | 294 } |
| OLD | NEW |