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

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

Issue 116543010: Remove the Value class names from the global namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 6 years, 12 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 | Annotate | Revision Log
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 "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/test/values_test_util.h" 9 #include "base/test/values_test_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 ExpectChangeRecordActionValue(record.action, value, "action"); 51 ExpectChangeRecordActionValue(record.action, value, "action");
52 ExpectDictStringValue(base::Int64ToString(record.id), value, "id"); 52 ExpectDictStringValue(base::Int64ToString(record.id), value, "id");
53 if (record.action == ChangeRecord::ACTION_DELETE) { 53 if (record.action == ChangeRecord::ACTION_DELETE) {
54 scoped_ptr<base::DictionaryValue> expected_extra_value; 54 scoped_ptr<base::DictionaryValue> expected_extra_value;
55 if (record.extra.get()) { 55 if (record.extra.get()) {
56 expected_extra_value.reset(record.extra->ToValue()); 56 expected_extra_value.reset(record.extra->ToValue());
57 } 57 }
58 const base::Value* extra_value = NULL; 58 const base::Value* extra_value = NULL;
59 EXPECT_EQ(record.extra.get() != NULL, 59 EXPECT_EQ(record.extra.get() != NULL,
60 value.Get("extra", &extra_value)); 60 value.Get("extra", &extra_value));
61 EXPECT_TRUE(Value::Equals(extra_value, expected_extra_value.get())); 61 EXPECT_TRUE(base::Value::Equals(extra_value, expected_extra_value.get()));
62 62
63 scoped_ptr<base::DictionaryValue> expected_specifics_value( 63 scoped_ptr<base::DictionaryValue> expected_specifics_value(
64 EntitySpecificsToValue(record.specifics)); 64 EntitySpecificsToValue(record.specifics));
65 ExpectDictDictionaryValue(*expected_specifics_value, 65 ExpectDictDictionaryValue(*expected_specifics_value,
66 value, "specifics"); 66 value, "specifics");
67 } 67 }
68 } 68 }
69 69
70 class MockExtraChangeRecordData 70 class MockExtraChangeRecordData
71 : public ExtraPasswordChangeRecordData { 71 : public ExtraPasswordChangeRecordData {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 Invoke(&extra_value, &base::DictionaryValue::DeepCopy)); 128 Invoke(&extra_value, &base::DictionaryValue::DeepCopy));
129 129
130 record.extra.reset(extra.release()); 130 record.extra.reset(extra.release());
131 scoped_ptr<base::DictionaryValue> value(record.ToValue()); 131 scoped_ptr<base::DictionaryValue> value(record.ToValue());
132 CheckChangeRecordValue(record, *value); 132 CheckChangeRecordValue(record, *value);
133 } 133 }
134 } 134 }
135 135
136 } // namespace 136 } // namespace
137 } // namespace syncer 137 } // namespace syncer
OLDNEW
« no previous file with comments | « extensions/browser/event_router_unittest.cc ('k') | tools/json_schema_compiler/test/additional_properties_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698