| Index: cc/layers/video_layer_impl_unittest.cc
|
| diff --git a/cc/layers/video_layer_impl_unittest.cc b/cc/layers/video_layer_impl_unittest.cc
|
| index dc9c6fbefaa0ed8d575e044623ad56fe95b5a8ed..68a2b2ee217b24150d4643ca74f6c011ca602973 100644
|
| --- a/cc/layers/video_layer_impl_unittest.cc
|
| +++ b/cc/layers/video_layer_impl_unittest.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "cc/layers/video_layer_impl.h"
|
|
|
| +#include "cc/layers/video_frame_provider_client_impl.h"
|
| #include "cc/output/context_provider.h"
|
| #include "cc/output/output_surface.h"
|
| #include "cc/test/fake_video_frame_provider.h"
|
| @@ -76,5 +77,22 @@ TEST(VideoLayerImplTest, Occlusion) {
|
| }
|
| }
|
|
|
| +TEST(VideoLayerImplTest, DidBecomeActiveShouldSetActiveVideoLayer) {
|
| + LayerTestCommon::LayerImplTest impl;
|
| + DebugScopedSetImplThreadAndMainThreadBlocked thread(impl.proxy());
|
| +
|
| + FakeVideoFrameProvider provider;
|
| + VideoLayerImpl* video_layer_impl =
|
| + impl.AddChildToRoot<VideoLayerImpl>(&provider);
|
| +
|
| + VideoFrameProviderClientImpl* client =
|
| + static_cast<VideoFrameProviderClientImpl*>(provider.client());
|
| + ASSERT_TRUE(client);
|
| + EXPECT_FALSE(client->active_video_layer());
|
| +
|
| + video_layer_impl->DidBecomeActive();
|
| + EXPECT_EQ(video_layer_impl, client->active_video_layer());
|
| +}
|
| +
|
| } // namespace
|
| } // namespace cc
|
|
|