| OLD | NEW |
| 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 "media/test/pipeline_integration_test_base.h" | 5 #include "media/test/pipeline_integration_test_base.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 hashing_enabled_ = test_type & kHashed; | 134 hashing_enabled_ = test_type & kHashed; |
| 135 clockless_playback_ = test_type & kClockless; | 135 clockless_playback_ = test_type & kClockless; |
| 136 | 136 |
| 137 EXPECT_CALL(*this, OnMetadata(_)) | 137 EXPECT_CALL(*this, OnMetadata(_)) |
| 138 .Times(AtMost(1)) | 138 .Times(AtMost(1)) |
| 139 .WillRepeatedly(SaveArg<0>(&metadata_)); | 139 .WillRepeatedly(SaveArg<0>(&metadata_)); |
| 140 EXPECT_CALL(*this, OnBufferingStateChange(BUFFERING_HAVE_ENOUGH)) | 140 EXPECT_CALL(*this, OnBufferingStateChange(BUFFERING_HAVE_ENOUGH)) |
| 141 .Times(AnyNumber()); | 141 .Times(AnyNumber()); |
| 142 EXPECT_CALL(*this, OnBufferingStateChange(BUFFERING_HAVE_NOTHING)) | 142 EXPECT_CALL(*this, OnBufferingStateChange(BUFFERING_HAVE_NOTHING)) |
| 143 .Times(AnyNumber()); | 143 .Times(AnyNumber()); |
| 144 EXPECT_CALL(*this, OnDurationChange()).Times(AtMost(1)); | 144 EXPECT_CALL(*this, OnDurationChange()).Times(AnyNumber()); |
| 145 EXPECT_CALL(*this, OnVideoNaturalSizeChange(_)).Times(AtMost(1)); | 145 EXPECT_CALL(*this, OnVideoNaturalSizeChange(_)).Times(AtMost(1)); |
| 146 EXPECT_CALL(*this, OnVideoOpacityChange(_)).Times(AtMost(1)); | 146 EXPECT_CALL(*this, OnVideoOpacityChange(_)).Times(AtMost(1)); |
| 147 CreateDemuxer(std::move(data_source)); | 147 CreateDemuxer(std::move(data_source)); |
| 148 | 148 |
| 149 if (cdm_context) { | 149 if (cdm_context) { |
| 150 EXPECT_CALL(*this, DecryptorAttached(true)); | 150 EXPECT_CALL(*this, DecryptorAttached(true)); |
| 151 pipeline_->SetCdm( | 151 pipeline_->SetCdm( |
| 152 cdm_context, base::Bind(&PipelineIntegrationTestBase::DecryptorAttached, | 152 cdm_context, base::Bind(&PipelineIntegrationTestBase::DecryptorAttached, |
| 153 base::Unretained(this))); | 153 base::Unretained(this))); |
| 154 } | 154 } |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 DCHECK(clockless_playback_); | 401 DCHECK(clockless_playback_); |
| 402 return clockless_audio_sink_->render_time(); | 402 return clockless_audio_sink_->render_time(); |
| 403 } | 403 } |
| 404 | 404 |
| 405 base::TimeTicks DummyTickClock::NowTicks() { | 405 base::TimeTicks DummyTickClock::NowTicks() { |
| 406 now_ += base::TimeDelta::FromSeconds(60); | 406 now_ += base::TimeDelta::FromSeconds(60); |
| 407 return now_; | 407 return now_; |
| 408 } | 408 } |
| 409 | 409 |
| 410 } // namespace media | 410 } // namespace media |
| OLD | NEW |