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

Unified Diff: cc/trees/property_tree_unittest.cc

Issue 2194833002: Overscroll and Elasticity for views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-RouteThroughInputHandler
Patch Set: Restore functionality and fix bugs \o/ Created 4 years, 1 month 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/property_tree_builder.cc ('k') | cc/trees/transform_node.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree_unittest.cc
diff --git a/cc/trees/property_tree_unittest.cc b/cc/trees/property_tree_unittest.cc
index c0a84436c4141bd532b9924189e09ea8506e2fcc..650bf9fd2556076abfdb287e4ce838ee5a9d154d 100644
--- a/cc/trees/property_tree_unittest.cc
+++ b/cc/trees/property_tree_unittest.cc
@@ -43,7 +43,7 @@ TEST(PropertyTreeSerializationTest, TransformNodeSerialization) {
original.affected_by_outer_viewport_bounds_delta_y = false;
original.in_subtree_of_page_scale_layer = false;
original.post_local_scale_factor = 0.5f;
- original.scroll_offset = gfx::ScrollOffset(1.5f, 1.5f);
+ original.scroll_offset_with_overscroll = gfx::ScrollOffset(1.5f, 1.5f);
original.snap_amount = gfx::Vector2dF(0.4f, 0.4f);
original.source_offset = gfx::Vector2dF(2.5f, 2.4f);
original.source_to_parent = gfx::Vector2dF(3.2f, 3.2f);
@@ -248,11 +248,14 @@ TEST(PropertyTreeSerializationTest, ScrollTreeSerialization) {
third.owner_id = 20;
third.contains_non_fast_scrollable_region = true;
+ const gfx::ScrollOffset offset(1, 2);
+ const gfx::ScrollOffset overscroll(3, 4);
+
original.Insert(second, 0);
original.Insert(third, 1);
original.set_currently_scrolling_node(1);
- original.SetScrollOffset(1, gfx::ScrollOffset(1, 2));
+ original.SetScrollOffset(1, offset, overscroll);
proto::PropertyTree proto;
original.ToProtobuf(&proto);
@@ -266,7 +269,7 @@ TEST(PropertyTreeSerializationTest, ScrollTreeSerialization) {
original.clear();
original.set_currently_scrolling_node(0);
- original.SetScrollOffset(2, gfx::ScrollOffset(1, 2));
+ original.SetScrollOffset(2, offset, overscroll);
proto::PropertyTree proto2;
original.ToProtobuf(&proto2);
« no previous file with comments | « cc/trees/property_tree_builder.cc ('k') | cc/trees/transform_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698