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

Side by Side Diff: components/sync/core/simple_metadata_change_list_unittest.cc

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 #include "components/sync/core/simple_metadata_change_list.h" 4 #include "components/sync/core/simple_metadata_change_list.h"
5 5
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "components/sync/api/mock_model_type_store.h" 8 #include "components/sync/api/mock_model_type_store.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace syncer_v2 { 11 namespace syncer {
12 namespace { 12 namespace {
13 13
14 using WriteBatch = ModelTypeStore::WriteBatch; 14 using WriteBatch = ModelTypeStore::WriteBatch;
15 15
16 void RecordMetadataWrite(std::map<std::string, std::string>* map, 16 void RecordMetadataWrite(std::map<std::string, std::string>* map,
17 WriteBatch* batch, 17 WriteBatch* batch,
18 const std::string& key, 18 const std::string& key,
19 const std::string& value) { 19 const std::string& value) {
20 (*map)[key] = value; 20 (*map)[key] = value;
21 } 21 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 std::unique_ptr<WriteBatch> batch = store()->CreateWriteBatch(); 178 std::unique_ptr<WriteBatch> batch = store()->CreateWriteBatch();
179 cl.TransferChanges(store(), batch.get()); 179 cl.TransferChanges(store(), batch.get());
180 180
181 EXPECT_TRUE(delete_set.find("client_tag") != delete_set.end()); 181 EXPECT_TRUE(delete_set.find("client_tag") != delete_set.end());
182 EXPECT_TRUE(change_map.find("client_tag") == change_map.end()); 182 EXPECT_TRUE(change_map.find("client_tag") == change_map.end());
183 EXPECT_TRUE(delete_called); 183 EXPECT_TRUE(delete_called);
184 EXPECT_TRUE(global_metadata.empty()); 184 EXPECT_TRUE(global_metadata.empty());
185 } 185 }
186 186
187 } // namespace 187 } // namespace
188 } // namespace syncer_v2 188 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/core/simple_metadata_change_list.cc ('k') | components/sync/core/sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698