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

Unified Diff: media/gpu/android_video_decode_accelerator_unittest.cc

Issue 2892083002: Send enter / exit fullscreen signal to AVDA (Closed)
Patch Set: unit test Created 3 years, 7 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
Index: media/gpu/android_video_decode_accelerator_unittest.cc
diff --git a/media/gpu/android_video_decode_accelerator_unittest.cc b/media/gpu/android_video_decode_accelerator_unittest.cc
index b61f7cde0222d723639aa54bdc95cacfcdf5d410..74cc755f2cff6c507e333ca6f0f8210b3c043847 100644
--- a/media/gpu/android_video_decode_accelerator_unittest.cc
+++ b/media/gpu/android_video_decode_accelerator_unittest.cc
@@ -337,7 +337,7 @@ class AndroidVideoDecodeAcceleratorTest : public testing::Test {
// Initialize |vda_|, providing a new surface for it. You may get the surface
// by asking |codec_allocator_|.
void InitializeAVDAWithOverlay() {
- config_.surface_id = 123;
+ config_.overlay_info.surface_id = 123;
ASSERT_TRUE(InitializeAVDA());
base::RunLoop().RunUntilIdle();
ASSERT_TRUE(chooser_->factory_);
@@ -487,7 +487,7 @@ TEST_F(AndroidVideoDecodeAcceleratorTest,
// in a state that AVDA isn't supposed to handle (e.g., if we give it a
// surface, then it would never decide to defer surface creation).
platform_config_.force_deferred_surface_creation = true;
- config_.surface_id = SurfaceManager::kNoSurfaceID;
+ config_.overlay_info.surface_id = SurfaceManager::kNoSurfaceID;
EXPECT_CALL(*chooser_, MockInitialize()).Times(0);
EXPECT_CALL(client_, NotifyInitializationComplete(true));
@@ -692,4 +692,14 @@ TEST_F(AndroidVideoDecodeAcceleratorTest,
base::RunLoop().RunUntilIdle();
}
+TEST_F(AndroidVideoDecodeAcceleratorTest,
+ OverlayInfoWithoutFactoryInfoDoesntChangeTheSurface) {
+ // Send OverlayInfo without surface id / routing token, and verify that AVDA
+ // doesn't try to change the factory.
+ InitializeAVDAWithOverlay();
+
+ EXPECT_CALL(*chooser_, MockReplaceOverlayFactory()).Times(0);
+ avda()->SetOverlayInfo(OverlayInfo());
+}
+
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698