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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 494823002: Plumb selection edge points through the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Order tweak Created 6 years, 4 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/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 1322f835e08d0e75f29d17c3aba64ed729847e98..54e1da5666d8e2f4435b2545d3ac63210e27b4e9 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -6345,11 +6345,13 @@ TEST_F(LayerTreeHostImplTest, SelectionBoundsPassedToCompositorFrameMetadata) {
EXPECT_EQ(ViewportSelectionBound(), selection_end_before);
// Plumb the layer-local selection bounds.
- gfx::Rect selection_rect(5, 0, 0, 5);
+ gfx::PointF selection_top(5, 0);
+ gfx::PointF selection_bottom(5, 5);
LayerSelectionBound start, end;
start.type = SELECTION_BOUND_CENTER;
start.layer_id = root_layer_id;
- start.layer_rect = selection_rect;
+ start.edge_bottom = selection_bottom;
+ start.edge_top = selection_top;
end = start;
host_impl_->active_tree()->RegisterSelection(start, end);
@@ -6370,8 +6372,8 @@ TEST_F(LayerTreeHostImplTest, SelectionBoundsPassedToCompositorFrameMetadata) {
fake_output_surface->last_sent_frame().metadata.selection_end;
EXPECT_EQ(start.type, selection_start_after.type);
EXPECT_EQ(end.type, selection_end_after.type);
- EXPECT_EQ(selection_rect, selection_start_after.viewport_rect);
- EXPECT_EQ(selection_rect, selection_start_after.viewport_rect);
+ EXPECT_EQ(selection_bottom, selection_start_after.edge_bottom);
+ EXPECT_EQ(selection_top, selection_start_after.edge_top);
EXPECT_TRUE(selection_start_after.visible);
EXPECT_TRUE(selection_start_after.visible);
}

Powered by Google App Engine
This is Rietveld 408576698