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

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

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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>
6
5 #include "base/macros.h" 7 #include "base/macros.h"
6 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" 10 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
9 #include "chrome/browser/sync/test/integration/single_client_status_change_check er.h" 11 #include "chrome/browser/sync/test/integration/single_client_status_change_check er.h"
10 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" 12 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
11 #include "chrome/browser/sync/test/integration/sync_test.h" 13 #include "chrome/browser/sync/test/integration/sync_test.h"
12 #include "components/bookmarks/browser/bookmark_model.h" 14 #include "components/bookmarks/browser/bookmark_model.h"
13 #include "components/browser_sync/browser/profile_sync_service.h" 15 #include "components/browser_sync/browser/profile_sync_service.h"
14 #include "sync/test/fake_server/bookmark_entity_builder.h" 16 #include "sync/test/fake_server/bookmark_entity_builder.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 ASSERT_TRUE(SetupSync()); 347 ASSERT_TRUE(SetupSync());
346 348
347 ASSERT_EQ(1, CountBookmarksWithTitlesMatching(kSingleProfileIndex, title)); 349 ASSERT_EQ(1, CountBookmarksWithTitlesMatching(kSingleProfileIndex, title));
348 350
349 std::vector<sync_pb::SyncEntity> server_bookmarks = 351 std::vector<sync_pb::SyncEntity> server_bookmarks =
350 GetFakeServer()->GetSyncEntitiesByModelType(syncer::BOOKMARKS); 352 GetFakeServer()->GetSyncEntitiesByModelType(syncer::BOOKMARKS);
351 ASSERT_EQ(1ul, server_bookmarks.size()); 353 ASSERT_EQ(1ul, server_bookmarks.size());
352 std::string entity_id = server_bookmarks[0].id_string(); 354 std::string entity_id = server_bookmarks[0].id_string();
353 scoped_ptr<fake_server::FakeServerEntity> tombstone( 355 scoped_ptr<fake_server::FakeServerEntity> tombstone(
354 fake_server::TombstoneEntity::Create(entity_id)); 356 fake_server::TombstoneEntity::Create(entity_id));
355 GetFakeServer()->InjectEntity(tombstone.Pass()); 357 GetFakeServer()->InjectEntity(std::move(tombstone));
356 358
357 const syncer::ModelTypeSet kBookmarksType(syncer::BOOKMARKS); 359 const syncer::ModelTypeSet kBookmarksType(syncer::BOOKMARKS);
358 TriggerSyncForModelTypes(kSingleProfileIndex, kBookmarksType); 360 TriggerSyncForModelTypes(kSingleProfileIndex, kBookmarksType);
359 361
360 const int kExpectedCountAfterDeletion = 0; 362 const int kExpectedCountAfterDeletion = 0;
361 ASSERT_TRUE(AwaitCountBookmarksWithTitlesMatching( 363 ASSERT_TRUE(AwaitCountBookmarksWithTitlesMatching(
362 kSingleProfileIndex, title, kExpectedCountAfterDeletion)); 364 kSingleProfileIndex, title, kExpectedCountAfterDeletion));
363 } 365 }
364 366
365 IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, 367 IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 ASSERT_EQ(0, CountFoldersWithTitlesMatching(kSingleProfileIndex, title)); 416 ASSERT_EQ(0, CountFoldersWithTitlesMatching(kSingleProfileIndex, title));
415 417
416 ASSERT_TRUE(SetupSync()); 418 ASSERT_TRUE(SetupSync());
417 419
418 ASSERT_EQ(1, CountFoldersWithTitlesMatching(kSingleProfileIndex, title)); 420 ASSERT_EQ(1, CountFoldersWithTitlesMatching(kSingleProfileIndex, title));
419 } 421 }
420 422
421 IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, E2E_ONLY(SanitySetup)) { 423 IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, E2E_ONLY(SanitySetup)) {
422 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 424 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
423 } 425 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698