Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc

Issue 1882243004: Convert //chrome/browser/sync from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698