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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 | 553 |
554 TEST_F(VideoRendererImplTest, ReinitializeForAnotherStream) { | 554 TEST_F(VideoRendererImplTest, ReinitializeForAnotherStream) { |
555 Initialize(); | 555 Initialize(); |
556 StartPlayingFrom(0); | 556 StartPlayingFrom(0); |
557 Flush(); | 557 Flush(); |
558 NiceMock<MockDemuxerStream> new_stream(DemuxerStream::VIDEO); | 558 NiceMock<MockDemuxerStream> new_stream(DemuxerStream::VIDEO); |
559 new_stream.set_video_decoder_config(TestVideoConfig::Normal()); | 559 new_stream.set_video_decoder_config(TestVideoConfig::Normal()); |
560 InitializeRenderer(&new_stream, false, true); | 560 InitializeRenderer(&new_stream, false, true); |
561 } | 561 } |
562 | 562 |
563 TEST_F(VideoRendererImplTest, DestroyWhileInitializing) { | 563 // crbug.com/697171. |
| 564 #if defined(MEMORY_SANITIZER) |
| 565 #define MAYBE_DestroyWhileInitializing DISABLED_DestroyWhileInitializing |
| 566 #else |
| 567 #define MAYBE_DestroyWhileInitializing DestroyWhileInitializing |
| 568 #endif |
| 569 TEST_F(VideoRendererImplTest, MAYBE_DestroyWhileInitializing) { |
564 CallInitialize(&demuxer_stream_, NewExpectedStatusCB(PIPELINE_ERROR_ABORT), | 570 CallInitialize(&demuxer_stream_, NewExpectedStatusCB(PIPELINE_ERROR_ABORT), |
565 false, PIPELINE_OK); | 571 false, PIPELINE_OK); |
566 Destroy(); | 572 Destroy(); |
567 } | 573 } |
568 | 574 |
569 TEST_F(VideoRendererImplTest, DestroyWhileFlushing) { | 575 TEST_F(VideoRendererImplTest, DestroyWhileFlushing) { |
570 Initialize(); | 576 Initialize(); |
571 QueueFrames("0 10 20 30"); | 577 QueueFrames("0 10 20 30"); |
572 EXPECT_CALL(mock_cb_, FrameReceived(HasTimestampMatcher(0))); | 578 EXPECT_CALL(mock_cb_, FrameReceived(HasTimestampMatcher(0))); |
573 EXPECT_CALL(mock_cb_, OnBufferingStateChange(BUFFERING_HAVE_ENOUGH)); | 579 EXPECT_CALL(mock_cb_, OnBufferingStateChange(BUFFERING_HAVE_ENOUGH)); |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 QueueFrames("0 10 20 30"); | 1216 QueueFrames("0 10 20 30"); |
1211 StartPlayingFrom(0); | 1217 StartPlayingFrom(0); |
1212 Flush(); | 1218 Flush(); |
1213 ASSERT_EQ(1u, frame_ready_cbs_.size()); | 1219 ASSERT_EQ(1u, frame_ready_cbs_.size()); |
1214 // This frame will be discarded. | 1220 // This frame will be discarded. |
1215 frame_ready_cbs_.front().Run(); | 1221 frame_ready_cbs_.front().Run(); |
1216 Destroy(); | 1222 Destroy(); |
1217 } | 1223 } |
1218 | 1224 |
1219 } // namespace media | 1225 } // namespace media |
OLD | NEW |