Chromium Code Reviews| 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..11cb6140d841c6d916fded164e624914aaed9c2a 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_TRUE(client->active_video_layer()); |
|
scherkus (not reviewing)
2014/03/28 21:37:29
this should probably be an EXPECT_EQ()
enne (OOO)
2014/03/28 21:39:35
If it fails, then you know it's NULL. So, maybe n
|
| +} |
| + |
| } // namespace |
| } // namespace cc |