Index: cc/layers/surface_layer_unittest.cc |
diff --git a/cc/layers/surface_layer_unittest.cc b/cc/layers/surface_layer_unittest.cc |
index 4c354a7a5f6100ddd6a008a9972d3b2b2ab9aaab..ff34ffd6dd20d061fa9533d901baa45d394efae5 100644 |
--- a/cc/layers/surface_layer_unittest.cc |
+++ b/cc/layers/surface_layer_unittest.cc |
@@ -173,7 +173,26 @@ TEST_F(SurfaceLayerTest, SurfaceInfoPushProperties) { |
LocalSurfaceId(2, base::UnguessableToken::Create())), |
2.f, gfx::Size(10, 10)); |
layer->SetFallbackSurfaceInfo(fallback_info); |
- layer->PushPropertiesTo(layer_impl.get()); |
+ |
+ // Verify that surface layer ids are recorded on the layer tree host and need |
+ // to be pushed. |
+ EXPECT_TRUE(layer_tree_host_->needs_surface_ids_sync()); |
+ EXPECT_EQ(layer_tree_host_->SurfaceLayerIds().size(), 1u); |
+ |
+ // Verify that pending tree has no surface ids already. |
+ EXPECT_FALSE(host_impl_.pending_tree()->needs_surface_ids_sync()); |
+ EXPECT_EQ(host_impl_.pending_tree()->SurfaceLayerIds().size(), 0u); |
+ |
+ TreeSynchronizer::PushLayerProperties(layer_tree_host_.get(), |
+ host_impl_.pending_tree()); |
+ |
+ // Verify that pending tree received the surface ids and also has |
+ // needs_surface_ids_sync set to true as it needs to sync with active tree. |
+ EXPECT_TRUE(host_impl_.pending_tree()->needs_surface_ids_sync()); |
+ EXPECT_EQ(host_impl_.pending_tree()->SurfaceLayerIds().size(), 1u); |
+ |
+ // Verify we have reset the state on layer tree host. |
+ EXPECT_FALSE(layer_tree_host_->needs_surface_ids_sync()); |
// Verify that the primary SurfaceInfo stays the same and the new fallback |
// SurfaceInfo is pushed through. |