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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 379473002: Rename composited selection anchor/focus to start/end (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test Created 6 years, 5 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_impl.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 90c0a579488be3f289325796bc645bef2a865cb1..ab3d71e1b06c11daa296fc2a2fe176f397a33e7d 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -6305,21 +6305,21 @@ TEST_F(LayerTreeHostImplTest, SelectionBoundsPassedToCompositorFrameMetadata) {
// Ensure the default frame selection bounds are empty.
FakeOutputSurface* fake_output_surface =
static_cast<FakeOutputSurface*>(host_impl_->output_surface());
- const ViewportSelectionBound& selection_anchor_before =
- fake_output_surface->last_sent_frame().metadata.selection_anchor;
- const ViewportSelectionBound& selection_focus_before =
- fake_output_surface->last_sent_frame().metadata.selection_focus;
- EXPECT_EQ(ViewportSelectionBound(), selection_anchor_before);
- EXPECT_EQ(ViewportSelectionBound(), selection_focus_before);
+ const ViewportSelectionBound& selection_start_before =
+ fake_output_surface->last_sent_frame().metadata.selection_start;
+ const ViewportSelectionBound& selection_end_before =
+ fake_output_surface->last_sent_frame().metadata.selection_end;
+ EXPECT_EQ(ViewportSelectionBound(), selection_start_before);
+ EXPECT_EQ(ViewportSelectionBound(), selection_end_before);
// Plumb the layer-local selection bounds.
gfx::Rect selection_rect(5, 0, 0, 5);
- LayerSelectionBound anchor, focus;
- anchor.type = SELECTION_BOUND_CENTER;
- anchor.layer_id = root_layer_id;
- anchor.layer_rect = selection_rect;
- focus = anchor;
- host_impl_->active_tree()->RegisterSelection(anchor, focus);
+ LayerSelectionBound start, end;
+ start.type = SELECTION_BOUND_CENTER;
+ start.layer_id = root_layer_id;
+ start.layer_rect = selection_rect;
+ end = start;
+ host_impl_->active_tree()->RegisterSelection(start, end);
// Trigger a draw-swap sequence.
host_impl_->SetNeedsRedraw();
@@ -6332,16 +6332,16 @@ TEST_F(LayerTreeHostImplTest, SelectionBoundsPassedToCompositorFrameMetadata) {
EXPECT_TRUE(host_impl_->SwapBuffers(frame));
// Ensure the selection bounds have propagated to the frame metadata.
- const ViewportSelectionBound& selection_anchor_after =
- fake_output_surface->last_sent_frame().metadata.selection_anchor;
- const ViewportSelectionBound& selection_focus_after =
- fake_output_surface->last_sent_frame().metadata.selection_focus;
- EXPECT_EQ(anchor.type, selection_anchor_after.type);
- EXPECT_EQ(focus.type, selection_focus_after.type);
- EXPECT_EQ(selection_rect, selection_anchor_after.viewport_rect);
- EXPECT_EQ(selection_rect, selection_anchor_after.viewport_rect);
- EXPECT_TRUE(selection_anchor_after.visible);
- EXPECT_TRUE(selection_anchor_after.visible);
+ const ViewportSelectionBound& selection_start_after =
+ fake_output_surface->last_sent_frame().metadata.selection_start;
+ const ViewportSelectionBound& selection_end_after =
+ 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_TRUE(selection_start_after.visible);
+ EXPECT_TRUE(selection_start_after.visible);
}
class SimpleSwapPromiseMonitor : public SwapPromiseMonitor {
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698