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

Unified Diff: cc/trees/layer_tree_host_common_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, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index 69a8ce78a0d38e2e017b43e4a1d9e3571eda83f9..304adcdf785a9d2bba41e691b0dac739854d0899 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -10067,7 +10067,8 @@ TEST_F(LayerTreeHostCommonTest, ScrollTreeBuilderTest) {
// Property tree root
ScrollTree scroll_tree = host()->property_trees()->scroll_tree;
- ScrollTree expected_scroll_tree;
+ PropertyTrees property_trees;
+ ScrollTree expected_scroll_tree = property_trees.scroll_tree;
ScrollNode* property_tree_root = expected_scroll_tree.Node(0);
property_tree_root->id = kRootPropertyTreeNodeId;
property_tree_root->parent_id = kInvalidPropertyTreeNodeId;
@@ -10150,6 +10151,12 @@ TEST_F(LayerTreeHostCommonTest, ScrollTreeBuilderTest) {
scroll_parent5.data.transform_id = parent5->transform_tree_index();
expected_scroll_tree.Insert(scroll_parent5, 1);
+ expected_scroll_tree.synced_scroll_offset(parent2->id())
+ ->PushFromMainThread(gfx::ScrollOffset(0, 0));
+ expected_scroll_tree.synced_scroll_offset(child7->id())
+ ->PushFromMainThread(gfx::ScrollOffset(0, 0));
+ expected_scroll_tree.synced_scroll_offset(grand_child11->id())
+ ->PushFromMainThread(gfx::ScrollOffset(0, 0));
expected_scroll_tree.set_needs_update(false);
EXPECT_EQ(expected_scroll_tree, scroll_tree);
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698