| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 time_source_.StopTicking(); | 907 time_source_.StopTicking(); |
| 908 | 908 |
| 909 // Providing the end of stream packet should remove all frames and exit. | 909 // Providing the end of stream packet should remove all frames and exit. |
| 910 SatisfyPendingDecodeWithEndOfStream(); | 910 SatisfyPendingDecodeWithEndOfStream(); |
| 911 EXPECT_CALL(mock_cb_, OnBufferingStateChange(BUFFERING_HAVE_ENOUGH)); | 911 EXPECT_CALL(mock_cb_, OnBufferingStateChange(BUFFERING_HAVE_ENOUGH)); |
| 912 WaitForEnded(); | 912 WaitForEnded(); |
| 913 Destroy(); | 913 Destroy(); |
| 914 } | 914 } |
| 915 | 915 |
| 916 // Tests the case where underflow evicts all frames in the HAVE_ENOUGH state. | 916 // Tests the case where underflow evicts all frames in the HAVE_ENOUGH state. |
| 917 TEST_F(VideoRendererImplTest, UnderflowEvictionWhileHaveEnough) { | 917 // Note: Disabled for merge into M54 since it is flaky there. |
| 918 TEST_F(VideoRendererImplTest, DISABLED_UnderflowEvictionWhileHaveEnough) { |
| 918 Initialize(); | 919 Initialize(); |
| 919 QueueFrames("0 30 60 90 100"); | 920 QueueFrames("0 30 60 90 100"); |
| 920 | 921 |
| 921 { | 922 { |
| 922 SCOPED_TRACE("Waiting for BUFFERING_HAVE_ENOUGH"); | 923 SCOPED_TRACE("Waiting for BUFFERING_HAVE_ENOUGH"); |
| 923 WaitableMessageLoopEvent event; | 924 WaitableMessageLoopEvent event; |
| 924 EXPECT_CALL(mock_cb_, OnBufferingStateChange(BUFFERING_HAVE_ENOUGH)) | 925 EXPECT_CALL(mock_cb_, OnBufferingStateChange(BUFFERING_HAVE_ENOUGH)) |
| 925 .WillOnce(RunClosure(event.GetClosure())); | 926 .WillOnce(RunClosure(event.GetClosure())); |
| 926 EXPECT_CALL(mock_cb_, FrameReceived(_)).Times(AnyNumber()); | 927 EXPECT_CALL(mock_cb_, FrameReceived(_)).Times(AnyNumber()); |
| 927 EXPECT_CALL(mock_cb_, OnVideoNaturalSizeChange(_)).Times(1); | 928 EXPECT_CALL(mock_cb_, OnVideoNaturalSizeChange(_)).Times(1); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1188 QueueFrames("0 10 20 30"); | 1189 QueueFrames("0 10 20 30"); |
| 1189 StartPlayingFrom(0); | 1190 StartPlayingFrom(0); |
| 1190 Flush(); | 1191 Flush(); |
| 1191 ASSERT_EQ(1u, frame_ready_cbs_.size()); | 1192 ASSERT_EQ(1u, frame_ready_cbs_.size()); |
| 1192 // This frame will be discarded. | 1193 // This frame will be discarded. |
| 1193 frame_ready_cbs_.front().Run(); | 1194 frame_ready_cbs_.front().Run(); |
| 1194 Destroy(); | 1195 Destroy(); |
| 1195 } | 1196 } |
| 1196 | 1197 |
| 1197 } // namespace media | 1198 } // namespace media |
| OLD | NEW |