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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2030033003: Replace cc::ViewportSelectionBound with gfx::SelectionBound (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android build compiles locally Created 4 years, 6 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 a2544658639c3d789214af745f0a266f00261026..f0a30855568ec9ffb9e333c371c29ebacc056679 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -8270,16 +8270,16 @@ TEST_F(LayerTreeHostImplTest, SelectionBoundsPassedToCompositorFrameMetadata) {
// Ensure the default frame selection bounds are empty.
FakeOutputSurface* fake_output_surface =
static_cast<FakeOutputSurface*>(host_impl_->output_surface());
- const ViewportSelection& selection_before =
+ const Selection<gfx::SelectionBound>& selection_before =
fake_output_surface->last_sent_frame().metadata.selection;
- EXPECT_EQ(ViewportSelectionBound(), selection_before.start);
- EXPECT_EQ(ViewportSelectionBound(), selection_before.end);
+ EXPECT_EQ(gfx::SelectionBound(), selection_before.start);
+ EXPECT_EQ(gfx::SelectionBound(), selection_before.end);
// Plumb the layer-local selection bounds.
gfx::Point selection_top(5, 0);
gfx::Point selection_bottom(5, 5);
LayerSelection selection;
- selection.start.type = SELECTION_BOUND_CENTER;
+ selection.start.type = gfx::SelectionBound::CENTER;
selection.start.layer_id = root_layer_id;
selection.start.edge_bottom = selection_bottom;
selection.start.edge_top = selection_top;
@@ -8297,14 +8297,14 @@ TEST_F(LayerTreeHostImplTest, SelectionBoundsPassedToCompositorFrameMetadata) {
EXPECT_TRUE(host_impl_->SwapBuffers(frame));
// Ensure the selection bounds have propagated to the frame metadata.
- const ViewportSelection& selection_after =
+ const Selection<gfx::SelectionBound>& selection_after =
fake_output_surface->last_sent_frame().metadata.selection;
- EXPECT_EQ(selection.start.type, selection_after.start.type);
- EXPECT_EQ(selection.end.type, selection_after.end.type);
- EXPECT_EQ(gfx::PointF(selection_bottom), selection_after.start.edge_bottom);
- EXPECT_EQ(gfx::PointF(selection_top), selection_after.start.edge_top);
- EXPECT_TRUE(selection_after.start.visible);
- EXPECT_TRUE(selection_after.start.visible);
+ EXPECT_EQ(selection.start.type, selection_after.start.type());
+ EXPECT_EQ(selection.end.type, selection_after.end.type());
+ EXPECT_EQ(gfx::PointF(selection_bottom), selection_after.start.edge_bottom());
+ EXPECT_EQ(gfx::PointF(selection_top), selection_after.start.edge_top());
+ EXPECT_TRUE(selection_after.start.visible());
+ EXPECT_TRUE(selection_after.start.visible());
}
class SimpleSwapPromiseMonitor : public SwapPromiseMonitor {

Powered by Google App Engine
This is Rietveld 408576698