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

Unified Diff: cc/layers/scrollbar_layer_unittest.cc

Issue 2877673002: Rewrite Layer::SetScrollOffset{FromImplSide} property tree fast-path (Closed)
Patch Set: Address reviewer comments with simpler "UpdateScrollOffset" fn Created 3 years, 7 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
Index: cc/layers/scrollbar_layer_unittest.cc
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index f490e41bab9575a1330d56084b70a46a0043bb3b..35385f0c14ddabfc03409accf2ca3d01cd6afa18 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -437,6 +437,7 @@ TEST_F(ScrollbarLayerTest, ThumbRect) {
// Over-scroll (thumb position should clamp on the far side).
root_layer->SetScrollOffset(gfx::ScrollOffset(85, 0));
+ layer_tree_host_->UpdateLayers();
UPDATE_AND_EXTRACT_LAYER_POINTERS();
EXPECT_EQ(gfx::Rect(56, 0, 4, 10).ToString(),
@@ -909,6 +910,7 @@ class ScrollbarLayerTestResourceCreationAndRelease : public ScrollbarLayerTest {
int expected_deleted,
bool use_solid_color_scrollbar) {
std::unique_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, false));
+ scoped_refptr<Layer> root_clip_layer = Layer::Create();
scoped_refptr<Layer> layer_tree_root = Layer::Create();
scoped_refptr<Layer> content_layer = Layer::Create();
scoped_refptr<Layer> scrollbar_layer;
@@ -930,6 +932,7 @@ class ScrollbarLayerTestResourceCreationAndRelease : public ScrollbarLayerTest {
scrollbar_layer->SetIsDrawable(true);
scrollbar_layer->SetBounds(gfx::Size(100, 100));
+ layer_tree_root->SetScrollClipLayerId(root_clip_layer->id());
layer_tree_root->SetScrollOffset(gfx::ScrollOffset(10, 20));
layer_tree_root->SetBounds(gfx::Size(100, 200));
content_layer->SetBounds(gfx::Size(100, 200));
« no previous file with comments | « cc/layers/layer.cc ('k') | third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698