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

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: Use gfx::SelectionBound 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
« no previous file with comments | « cc/output/viewport_selection_bound.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 a2544658639c3d789214af745f0a266f00261026..3d6069f056136bf1b6697ba95f5802c26a2a7737 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -8270,10 +8270,10 @@ 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);
@@ -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());
Fady Samuel 2016/06/03 03:46:53 What should I do about these types? They're no lon
sadrul 2016/06/03 07:59:21 Looks like LayerSelectionBound could also be repla
Fady Samuel 2016/06/03 16:25:15 You're right but that looks like a lot of work. I
+ // 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 {
« no previous file with comments | « cc/output/viewport_selection_bound.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698