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

Side by Side Diff: media/base/pipeline_unittest.cc

Issue 692323002: Move Liveness from DemuxerStreamProvider to DemuxerStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/test/simple_test_tick_clock.h" 10 #include "base/test/simple_test_tick_clock.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 renderer_(scoped_renderer_.get()) { 91 renderer_(scoped_renderer_.get()) {
92 // SetDemuxerExpectations() adds overriding expectations for expected 92 // SetDemuxerExpectations() adds overriding expectations for expected
93 // non-NULL streams. 93 // non-NULL streams.
94 DemuxerStream* null_pointer = NULL; 94 DemuxerStream* null_pointer = NULL;
95 EXPECT_CALL(*demuxer_, GetStream(_)) 95 EXPECT_CALL(*demuxer_, GetStream(_))
96 .WillRepeatedly(Return(null_pointer)); 96 .WillRepeatedly(Return(null_pointer));
97 97
98 EXPECT_CALL(*demuxer_, GetTimelineOffset()) 98 EXPECT_CALL(*demuxer_, GetTimelineOffset())
99 .WillRepeatedly(Return(base::Time())); 99 .WillRepeatedly(Return(base::Time()));
100 100
101 EXPECT_CALL(*demuxer_, GetLiveness())
102 .WillRepeatedly(Return(Demuxer::LIVENESS_UNKNOWN));
wolenetz 2014/11/11 23:48:07 Just a double-check: pipeline no longer should car
xhwang 2014/11/14 06:38:04 Yes. This is just to suppress warnings.
wolenetz 2014/11/14 19:21:58 Acknowledged.
103
104 EXPECT_CALL(*renderer_, GetMediaTime()) 101 EXPECT_CALL(*renderer_, GetMediaTime())
105 .WillRepeatedly(Return(base::TimeDelta())); 102 .WillRepeatedly(Return(base::TimeDelta()));
106 103
107 EXPECT_CALL(*demuxer_, GetStartTime()).WillRepeatedly(Return(start_time_)); 104 EXPECT_CALL(*demuxer_, GetStartTime()).WillRepeatedly(Return(start_time_));
108 } 105 }
109 106
110 virtual ~PipelineTest() { 107 virtual ~PipelineTest() {
111 if (!pipeline_ || !pipeline_->IsRunning()) 108 if (!pipeline_ || !pipeline_->IsRunning())
112 return; 109 return;
113 110
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 990
994 INSTANTIATE_TEARDOWN_TEST(Error, InitDemuxer); 991 INSTANTIATE_TEARDOWN_TEST(Error, InitDemuxer);
995 INSTANTIATE_TEARDOWN_TEST(Error, InitRenderer); 992 INSTANTIATE_TEARDOWN_TEST(Error, InitRenderer);
996 INSTANTIATE_TEARDOWN_TEST(Error, Flushing); 993 INSTANTIATE_TEARDOWN_TEST(Error, Flushing);
997 INSTANTIATE_TEARDOWN_TEST(Error, Seeking); 994 INSTANTIATE_TEARDOWN_TEST(Error, Seeking);
998 INSTANTIATE_TEARDOWN_TEST(Error, Playing); 995 INSTANTIATE_TEARDOWN_TEST(Error, Playing);
999 996
1000 INSTANTIATE_TEARDOWN_TEST(ErrorAndStop, Playing); 997 INSTANTIATE_TEARDOWN_TEST(ErrorAndStop, Playing);
1001 998
1002 } // namespace media 999 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698