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

Side by Side Diff: sync/syncable/entry_kernel_unittest.cc

Issue 1866243002: Convert //sync from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/syncable/entry_kernel.h" 5 #include "sync/syncable/entry_kernel.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace syncer { 9 namespace syncer {
10 10
11 namespace syncable { 11 namespace syncable {
12 12
13 class EntryKernelTest : public testing::Test {}; 13 class EntryKernelTest : public testing::Test {};
14 14
15 TEST_F(EntryKernelTest, ToValue) { 15 TEST_F(EntryKernelTest, ToValue) {
16 EntryKernel kernel; 16 EntryKernel kernel;
17 scoped_ptr<base::DictionaryValue> value(kernel.ToValue(NULL)); 17 std::unique_ptr<base::DictionaryValue> value(kernel.ToValue(NULL));
18 if (value) { 18 if (value) {
19 // Not much to check without repeating the ToValue() code. 19 // Not much to check without repeating the ToValue() code.
20 EXPECT_TRUE(value->HasKey("isDirty")); 20 EXPECT_TRUE(value->HasKey("isDirty"));
21 // The extra +2 is for "isDirty" and "modelType". 21 // The extra +2 is for "isDirty" and "modelType".
22 EXPECT_EQ(BIT_TEMPS_END - BEGIN_FIELDS + 2, 22 EXPECT_EQ(BIT_TEMPS_END - BEGIN_FIELDS + 2,
23 static_cast<int>(value->size())); 23 static_cast<int>(value->size()));
24 } else { 24 } else {
25 ADD_FAILURE(); 25 ADD_FAILURE();
26 } 26 }
27 } 27 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Put the new value into SPECIFICS and verify that that stops sharing even 77 // Put the new value into SPECIFICS and verify that that stops sharing even
78 // though the values are still equal. 78 // though the values are still equal.
79 kernel.put(SPECIFICS, specifics); 79 kernel.put(SPECIFICS, specifics);
80 EXPECT_FALSE(ProtoFieldValuesAreSame(kernel.ref(SPECIFICS), 80 EXPECT_FALSE(ProtoFieldValuesAreSame(kernel.ref(SPECIFICS),
81 kernel.ref(SERVER_SPECIFICS))); 81 kernel.ref(SERVER_SPECIFICS)));
82 } 82 }
83 83
84 } // namespace syncable 84 } // namespace syncable
85 85
86 } // namespace syncer 86 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698