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

Side by Side Diff: chrome/browser/sync/api/sync_change_unittest.cc

Issue 7904021: [Sync] Rework SharedValue<T> into Immutable<T> (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 3 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
« no previous file with comments | « chrome/browser/sync/api/DEPS ('k') | chrome/browser/sync/api/sync_data.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) 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
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
OLDNEW
« no previous file with comments | « chrome/browser/sync/api/DEPS ('k') | chrome/browser/sync/api/sync_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698