OLD | NEW |
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 "sync/internal_api/public/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 "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_v2 { |
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, |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_v2 |
OLD | NEW |