OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/sync/api/sync_change.h" | 5 #include "chrome/browser/sync/api/sync_change.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" |
9 #include "base/values.h" | 10 #include "base/values.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | |
11 #include "chrome/browser/sync/protocol/preference_specifics.pb.h" | 11 #include "chrome/browser/sync/protocol/preference_specifics.pb.h" |
12 #include "chrome/browser/sync/protocol/proto_value_conversions.h" | 12 #include "chrome/browser/sync/protocol/proto_value_conversions.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" |
13 | 14 |
14 using browser_sync::EntitySpecificsToValue; | 15 using browser_sync::EntitySpecificsToValue; |
15 | 16 |
16 // Ordered list of SyncChange's. | 17 // Ordered list of SyncChange's. |
17 typedef std::vector<SyncChange> SyncChangeList; | 18 typedef std::vector<SyncChange> SyncChangeList; |
18 | 19 |
19 namespace { | 20 namespace { |
20 | 21 |
21 typedef testing::Test SyncChangeTest; | 22 typedef testing::Test SyncChangeTest; |
22 | 23 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // Verify delete. | 124 // Verify delete. |
124 e = change_list[2]; | 125 e = change_list[2]; |
125 EXPECT_EQ(SyncChange::ACTION_DELETE, e.change_type()); | 126 EXPECT_EQ(SyncChange::ACTION_DELETE, e.change_type()); |
126 EXPECT_EQ(syncable::PREFERENCES, e.sync_data().GetDataType()); | 127 EXPECT_EQ(syncable::PREFERENCES, e.sync_data().GetDataType()); |
127 ref_spec.reset(EntitySpecificsToValue(delete_specifics)); | 128 ref_spec.reset(EntitySpecificsToValue(delete_specifics)); |
128 e_spec.reset(EntitySpecificsToValue(e.sync_data().GetSpecifics())); | 129 e_spec.reset(EntitySpecificsToValue(e.sync_data().GetSpecifics())); |
129 EXPECT_TRUE(ref_spec->Equals(e_spec.get())); | 130 EXPECT_TRUE(ref_spec->Equals(e_spec.get())); |
130 } | 131 } |
131 | 132 |
132 } // namespace | 133 } // namespace |
OLD | NEW |