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

Side by Side Diff: cc/proto/synced_property_conversions_unittest.cc

Issue 1736073002: cc: Move SyncedScrollOffset to scroll tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and add comment Created 4 years, 9 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
« no previous file with comments | « cc/proto/synced_property_conversions.cc ('k') | cc/test/fake_layer_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "cc/proto/synced_property_conversions.h"
6
7 #include "cc/proto/synced_property.pb.h"
8 #include "cc/trees/property_tree.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 namespace cc {
12 namespace {
13
14 TEST(SyncedPropertyConversionTest, SerializeDeserializeSyncedScrollOffset) {
15 scoped_refptr<SyncedScrollOffset> synced_scroll_offset =
16 new SyncedScrollOffset();
17 synced_scroll_offset->PushFromMainThread(gfx::ScrollOffset(1, 2));
18 proto::SyncedProperty proto;
19 scoped_refptr<SyncedScrollOffset> serialized_synced_scroll_offset =
20 new SyncedScrollOffset();
21 SyncedScrollOffsetToProto(*synced_scroll_offset.get(), &proto);
22 ProtoToSyncedScrollOffset(proto, serialized_synced_scroll_offset.get());
23 EXPECT_EQ(synced_scroll_offset.get()->PendingBase(),
24 serialized_synced_scroll_offset.get()->PendingBase());
25 EXPECT_EQ(synced_scroll_offset.get()->PendingBase(),
26 serialized_synced_scroll_offset.get()->PendingBase());
27 }
28
29 } // namespace
30 } // namespace cc
OLDNEW
« no previous file with comments | « cc/proto/synced_property_conversions.cc ('k') | cc/test/fake_layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698