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

Side by Side Diff: components/reading_list/ios/reading_list_store_unittest.mm

Issue 2511723002: Enable RL sync by default on iOS (Closed)
Patch Set: rebase Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/reading_list/reading_list_store.h" 5 #include "components/reading_list/ios/reading_list_store.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #import "base/test/ios/wait_util.h" 14 #import "base/test/ios/wait_util.h"
15 #include "components/reading_list/reading_list_model_impl.h" 15 #include "components/reading_list/ios/reading_list_model_impl.h"
16 #include "components/sync/model/fake_model_type_change_processor.h" 16 #include "components/sync/model/fake_model_type_change_processor.h"
17 #include "components/sync/model/model_type_store_test_util.h" 17 #include "components/sync/model/model_type_store_test_util.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 class FakeModelTypeChangeProcessorObserver { 20 class FakeModelTypeChangeProcessorObserver {
21 public: 21 public:
22 virtual void Put(const std::string& client_tag, 22 virtual void Put(const std::string& client_tag,
23 std::unique_ptr<syncer::EntityData> entity_data, 23 std::unique_ptr<syncer::EntityData> entity_data,
24 syncer::MetadataChangeList* metadata_change_list) = 0; 24 syncer::MetadataChangeList* metadata_change_list) = 0;
25 25
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 TEST_F(ReadingListStoreTest, ApplySyncChangesOneRemove) { 278 TEST_F(ReadingListStoreTest, ApplySyncChangesOneRemove) {
279 syncer::EntityChangeList delete_changes; 279 syncer::EntityChangeList delete_changes;
280 delete_changes.push_back( 280 delete_changes.push_back(
281 syncer::EntityChange::CreateDelete("http://read.example.com/")); 281 syncer::EntityChange::CreateDelete("http://read.example.com/"));
282 syncer::SyncError error = reading_list_store_->ApplySyncChanges( 282 syncer::SyncError error = reading_list_store_->ApplySyncChanges(
283 reading_list_store_->CreateMetadataChangeList(), delete_changes); 283 reading_list_store_->CreateMetadataChangeList(), delete_changes);
284 AssertCounts(0, 0, 0, 1, 0); 284 AssertCounts(0, 0, 0, 1, 0);
285 EXPECT_EQ(sync_removed_.size(), 1u); 285 EXPECT_EQ(sync_removed_.size(), 1u);
286 EXPECT_EQ(sync_removed_.count("http://read.example.com/"), 1u); 286 EXPECT_EQ(sync_removed_.count("http://read.example.com/"), 1u);
287 } 287 }
OLDNEW
« no previous file with comments | « components/reading_list/ios/reading_list_store_delegate.h ('k') | components/reading_list/offline_url_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698