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

Side by Side Diff: media/renderers/renderer_impl_unittest.cc

Issue 1935873002: Implement disabling and enabling media tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-control2
Patch Set: Check track ids via track_id_to_demux_stream_map_ Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 protected: 80 protected:
81 void Destroy() { 81 void Destroy() {
82 renderer_impl_.reset(); 82 renderer_impl_.reset();
83 base::RunLoop().RunUntilIdle(); 83 base::RunLoop().RunUntilIdle();
84 } 84 }
85 85
86 std::unique_ptr<StrictMock<MockDemuxerStream>> CreateStream( 86 std::unique_ptr<StrictMock<MockDemuxerStream>> CreateStream(
87 DemuxerStream::Type type) { 87 DemuxerStream::Type type) {
88 std::unique_ptr<StrictMock<MockDemuxerStream>> stream( 88 std::unique_ptr<StrictMock<MockDemuxerStream>> stream(
89 new StrictMock<MockDemuxerStream>(type)); 89 new StrictMock<MockDemuxerStream>(type));
90 EXPECT_CALL(*stream, SetStreamRestartedCB(_)).Times(testing::AnyNumber());
90 return stream; 91 return stream;
91 } 92 }
92 93
93 // Sets up expectations to allow the audio renderer to initialize. 94 // Sets up expectations to allow the audio renderer to initialize.
94 void SetAudioRendererInitializeExpectations(PipelineStatus status) { 95 void SetAudioRendererInitializeExpectations(PipelineStatus status) {
95 EXPECT_CALL(*audio_renderer_, Initialize(audio_stream_.get(), _, _, _)) 96 EXPECT_CALL(*audio_renderer_, Initialize(audio_stream_.get(), _, _, _))
96 .WillOnce( 97 .WillOnce(
97 DoAll(SaveArg<2>(&audio_renderer_client_), RunCallback<3>(status))); 98 DoAll(SaveArg<2>(&audio_renderer_client_), RunCallback<3>(status)));
98 } 99 }
99 100
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 .WillOnce( 694 .WillOnce(
694 SetBufferingState(&audio_renderer_client_, BUFFERING_HAVE_ENOUGH)); 695 SetBufferingState(&audio_renderer_client_, BUFFERING_HAVE_ENOUGH));
695 EXPECT_CALL(*video_renderer_, StartPlayingFrom(kStartTime)); 696 EXPECT_CALL(*video_renderer_, StartPlayingFrom(kStartTime));
696 renderer_impl_->StartPlayingFrom(kStartTime); 697 renderer_impl_->StartPlayingFrom(kStartTime);
697 698
698 // Nothing else should primed on the message loop. 699 // Nothing else should primed on the message loop.
699 base::RunLoop().RunUntilIdle(); 700 base::RunLoop().RunUntilIdle();
700 } 701 }
701 702
702 } // namespace media 703 } // namespace media
OLDNEW
« media/renderers/renderer_impl.cc ('K') | « media/renderers/renderer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698