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 7a358b5f376e615bc93ddbc8641617e649e7a369..94847ef653ee46bfa687ef5564030b8a92a15b05 100644 |
--- a/cc/trees/layer_tree_host_impl_unittest.cc |
+++ b/cc/trees/layer_tree_host_impl_unittest.cc |
@@ -583,7 +583,7 @@ TEST_F(LayerTreeHostImplTest, ResourcelessDrawWithEmptyViewport) { |
host_impl_->OnDraw(identity, viewport, viewport, resourceless_software_draw); |
ASSERT_EQ(fake_output_surface->num_sent_frames(), 1u); |
EXPECT_EQ(gfx::SizeF(100.f, 100.f), |
- fake_output_surface->last_sent_frame().metadata.root_layer_size); |
+ fake_output_surface->last_sent_frame()->metadata.root_layer_size); |
} |
TEST_F(LayerTreeHostImplTest, ScrollDeltaNoLayers) { |
@@ -8330,9 +8330,7 @@ TEST_F(LayerTreeHostImplTest, LatencyInfoPassedToCompositorFrameMetadata) { |
FakeOutputSurface* fake_output_surface = |
static_cast<FakeOutputSurface*>(host_impl_->output_surface()); |
- const std::vector<ui::LatencyInfo>& metadata_latency_before = |
- fake_output_surface->last_sent_frame().metadata.latency_info; |
- EXPECT_TRUE(metadata_latency_before.empty()); |
+ EXPECT_FALSE(fake_output_surface->last_sent_frame()); |
ui::LatencyInfo latency_info; |
latency_info.AddLatencyNumber( |
@@ -8350,7 +8348,7 @@ TEST_F(LayerTreeHostImplTest, LatencyInfoPassedToCompositorFrameMetadata) { |
EXPECT_TRUE(host_impl_->SwapBuffers(frame)); |
const std::vector<ui::LatencyInfo>& metadata_latency_after = |
- fake_output_surface->last_sent_frame().metadata.latency_info; |
+ fake_output_surface->last_sent_frame()->metadata.latency_info; |
EXPECT_EQ(1u, metadata_latency_after.size()); |
EXPECT_TRUE(metadata_latency_after[0].FindLatency( |
ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 0, NULL)); |
@@ -8367,13 +8365,9 @@ TEST_F(LayerTreeHostImplTest, SelectionBoundsPassedToCompositorFrameMetadata) { |
host_impl_->active_tree()->SetRootLayer(std::move(root)); |
- // Ensure the default frame selection bounds are empty. |
FakeOutputSurface* fake_output_surface = |
static_cast<FakeOutputSurface*>(host_impl_->output_surface()); |
- const Selection<gfx::SelectionBound>& selection_before = |
- fake_output_surface->last_sent_frame().metadata.selection; |
- EXPECT_EQ(gfx::SelectionBound(), selection_before.start); |
- EXPECT_EQ(gfx::SelectionBound(), selection_before.end); |
+ EXPECT_FALSE(fake_output_surface->last_sent_frame()); |
// Plumb the layer-local selection bounds. |
gfx::Point selection_top(5, 0); |
@@ -8398,7 +8392,7 @@ TEST_F(LayerTreeHostImplTest, SelectionBoundsPassedToCompositorFrameMetadata) { |
// Ensure the selection bounds have propagated to the frame metadata. |
const Selection<gfx::SelectionBound>& selection_after = |
- fake_output_surface->last_sent_frame().metadata.selection; |
+ 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()); |