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

Side by Side Diff: sync/internal_api/public/change_record_unittest.cc

Issue 1545553003: Switch to standard integer types in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « sync/internal_api/public/change_record.h ('k') | sync/internal_api/public/data_batch_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "sync/internal_api/public/change_record.h" 5 #include "sync/internal_api/public/change_record.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
9
7 #include <string> 10 #include <string>
8 11
9 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
11 #include "base/test/values_test_util.h" 14 #include "base/test/values_test_util.h"
12 #include "base/values.h" 15 #include "base/values.h"
13 #include "sync/protocol/extension_specifics.pb.h" 16 #include "sync/protocol/extension_specifics.pb.h"
14 #include "sync/protocol/proto_value_conversions.h" 17 #include "sync/protocol/proto_value_conversions.h"
15 #include "sync/protocol/sync.pb.h" 18 #include "sync/protocol/sync.pb.h"
16 #include "testing/gmock/include/gmock/gmock.h" 19 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 size_t to_value_calls_; 99 size_t to_value_calls_;
97 size_t expected_to_value_calls_; 100 size_t expected_to_value_calls_;
98 }; 101 };
99 102
100 TEST_F(ChangeRecordTest, ChangeRecordToValue) { 103 TEST_F(ChangeRecordTest, ChangeRecordToValue) {
101 sync_pb::EntitySpecifics old_specifics; 104 sync_pb::EntitySpecifics old_specifics;
102 old_specifics.mutable_extension()->set_id("old"); 105 old_specifics.mutable_extension()->set_id("old");
103 sync_pb::EntitySpecifics new_specifics; 106 sync_pb::EntitySpecifics new_specifics;
104 old_specifics.mutable_extension()->set_id("new"); 107 old_specifics.mutable_extension()->set_id("new");
105 108
106 const int64 kTestId = 5; 109 const int64_t kTestId = 5;
107 110
108 // Add 111 // Add
109 { 112 {
110 ChangeRecord record; 113 ChangeRecord record;
111 record.action = ChangeRecord::ACTION_ADD; 114 record.action = ChangeRecord::ACTION_ADD;
112 record.id = kTestId; 115 record.id = kTestId;
113 record.specifics = old_specifics; 116 record.specifics = old_specifics;
114 record.extra.reset(new TestExtraChangeRecordData()); 117 record.extra.reset(new TestExtraChangeRecordData());
115 scoped_ptr<base::DictionaryValue> value(record.ToValue()); 118 scoped_ptr<base::DictionaryValue> value(record.ToValue());
116 CheckChangeRecordValue(record, *value); 119 CheckChangeRecordValue(record, *value);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 extra->set_expected_to_value_calls(2U); 155 extra->set_expected_to_value_calls(2U);
153 156
154 record.extra.reset(extra.release()); 157 record.extra.reset(extra.release());
155 scoped_ptr<base::DictionaryValue> value(record.ToValue()); 158 scoped_ptr<base::DictionaryValue> value(record.ToValue());
156 CheckChangeRecordValue(record, *value); 159 CheckChangeRecordValue(record, *value);
157 } 160 }
158 } 161 }
159 162
160 } // namespace 163 } // namespace
161 } // namespace syncer 164 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/public/change_record.h ('k') | sync/internal_api/public/data_batch_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698