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

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

Issue 2618483003: [Sync] Introduce ModelError for USS error handling. (Closed)
Patch Set: Fix other iOS test file that I thought was the first one. Created 3 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 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/ios/reading_list_model.h" 5 #include "components/reading_list/ios/reading_list_model.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #import "base/test/ios/wait_util.h" 9 #import "base/test/ios/wait_util.h"
10 #include "components/reading_list/ios/reading_list_model_impl.h" 10 #include "components/reading_list/ios/reading_list_model_impl.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 return std::unique_ptr<ScopedBatchUpdate>(); 102 return std::unique_ptr<ScopedBatchUpdate>();
103 } 103 }
104 104
105 // Syncing is not used in this test class. 105 // Syncing is not used in this test class.
106 std::unique_ptr<syncer::MetadataChangeList> CreateMetadataChangeList() 106 std::unique_ptr<syncer::MetadataChangeList> CreateMetadataChangeList()
107 override { 107 override {
108 NOTREACHED(); 108 NOTREACHED();
109 return std::unique_ptr<syncer::MetadataChangeList>(); 109 return std::unique_ptr<syncer::MetadataChangeList>();
110 } 110 }
111 111
112 syncer::SyncError MergeSyncData( 112 syncer::ModelError MergeSyncData(
113 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list, 113 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
114 syncer::EntityDataMap entity_data_map) override { 114 syncer::EntityDataMap entity_data_map) override {
115 NOTREACHED(); 115 NOTREACHED();
116 return syncer::SyncError(); 116 return syncer::ModelError();
117 } 117 }
118 118
119 syncer::SyncError ApplySyncChanges( 119 syncer::ModelError ApplySyncChanges(
120 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list, 120 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
121 syncer::EntityChangeList entity_changes) override { 121 syncer::EntityChangeList entity_changes) override {
122 NOTREACHED(); 122 NOTREACHED();
123 return syncer::SyncError(); 123 return syncer::ModelError();
124 } 124 }
125 125
126 void GetData(StorageKeyList storage_keys, DataCallback callback) override { 126 void GetData(StorageKeyList storage_keys, DataCallback callback) override {
127 NOTREACHED(); 127 NOTREACHED();
128 return; 128 return;
129 } 129 }
130 130
131 void GetAllData(DataCallback callback) override { 131 void GetAllData(DataCallback callback) override {
132 NOTREACHED(); 132 NOTREACHED();
133 return; 133 return;
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 } 634 }
635 635
636 // Tests that ReadingListModel calls CallbackModelBeingDeleted when destroyed. 636 // Tests that ReadingListModel calls CallbackModelBeingDeleted when destroyed.
637 TEST_F(ReadingListModelTest, CallbackModelBeingDeleted) { 637 TEST_F(ReadingListModelTest, CallbackModelBeingDeleted) {
638 AssertObserverCount(1, 0, 0, 0, 0, 0, 0, 0, 0); 638 AssertObserverCount(1, 0, 0, 0, 0, 0, 0, 0, 0);
639 model_.reset(); 639 model_.reset();
640 AssertObserverCount(1, 0, 0, 1, 0, 0, 0, 0, 0); 640 AssertObserverCount(1, 0, 0, 1, 0, 0, 0, 0, 0);
641 } 641 }
642 642
643 } // namespace 643 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698