| 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 <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" | 10 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 | 345 |
| 346 DisableVerifier(); | 346 DisableVerifier(); |
| 347 ASSERT_TRUE(SetupSync()); | 347 ASSERT_TRUE(SetupSync()); |
| 348 | 348 |
| 349 ASSERT_EQ(1, CountBookmarksWithTitlesMatching(kSingleProfileIndex, title)); | 349 ASSERT_EQ(1, CountBookmarksWithTitlesMatching(kSingleProfileIndex, title)); |
| 350 | 350 |
| 351 std::vector<sync_pb::SyncEntity> server_bookmarks = | 351 std::vector<sync_pb::SyncEntity> server_bookmarks = |
| 352 GetFakeServer()->GetSyncEntitiesByModelType(syncer::BOOKMARKS); | 352 GetFakeServer()->GetSyncEntitiesByModelType(syncer::BOOKMARKS); |
| 353 ASSERT_EQ(1ul, server_bookmarks.size()); | 353 ASSERT_EQ(1ul, server_bookmarks.size()); |
| 354 std::string entity_id = server_bookmarks[0].id_string(); | 354 std::string entity_id = server_bookmarks[0].id_string(); |
| 355 scoped_ptr<fake_server::FakeServerEntity> tombstone( | 355 std::unique_ptr<fake_server::FakeServerEntity> tombstone( |
| 356 fake_server::TombstoneEntity::Create(entity_id)); | 356 fake_server::TombstoneEntity::Create(entity_id)); |
| 357 GetFakeServer()->InjectEntity(std::move(tombstone)); | 357 GetFakeServer()->InjectEntity(std::move(tombstone)); |
| 358 | 358 |
| 359 const syncer::ModelTypeSet kBookmarksType(syncer::BOOKMARKS); | 359 const syncer::ModelTypeSet kBookmarksType(syncer::BOOKMARKS); |
| 360 TriggerSyncForModelTypes(kSingleProfileIndex, kBookmarksType); | 360 TriggerSyncForModelTypes(kSingleProfileIndex, kBookmarksType); |
| 361 | 361 |
| 362 const int kExpectedCountAfterDeletion = 0; | 362 const int kExpectedCountAfterDeletion = 0; |
| 363 ASSERT_TRUE(AwaitCountBookmarksWithTitlesMatching( | 363 ASSERT_TRUE(AwaitCountBookmarksWithTitlesMatching( |
| 364 kSingleProfileIndex, title, kExpectedCountAfterDeletion)); | 364 kSingleProfileIndex, title, kExpectedCountAfterDeletion)); |
| 365 } | 365 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 ASSERT_EQ(0, CountFoldersWithTitlesMatching(kSingleProfileIndex, title)); | 416 ASSERT_EQ(0, CountFoldersWithTitlesMatching(kSingleProfileIndex, title)); |
| 417 | 417 |
| 418 ASSERT_TRUE(SetupSync()); | 418 ASSERT_TRUE(SetupSync()); |
| 419 | 419 |
| 420 ASSERT_EQ(1, CountFoldersWithTitlesMatching(kSingleProfileIndex, title)); | 420 ASSERT_EQ(1, CountFoldersWithTitlesMatching(kSingleProfileIndex, title)); |
| 421 } | 421 } |
| 422 | 422 |
| 423 IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, E2E_ONLY(SanitySetup)) { | 423 IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, E2E_ONLY(SanitySetup)) { |
| 424 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 424 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 425 } | 425 } |
| OLD | NEW |