| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/waitable_event.h" | 7 #include "base/waitable_event.h" |
| 8 #include "media/base/pipeline_impl.h" | 8 #include "media/base/pipeline_impl.h" |
| 9 #include "media/base/media_format.h" | 9 #include "media/base/media_format.h" |
| 10 #include "media/base/filters.h" | 10 #include "media/base/filters.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 mocks_->set_creation_successful(false); | 226 mocks_->set_creation_successful(false); |
| 227 | 227 |
| 228 InitializePipeline(); | 228 InitializePipeline(); |
| 229 EXPECT_FALSE(pipeline_.IsInitialized()); | 229 EXPECT_FALSE(pipeline_.IsInitialized()); |
| 230 EXPECT_EQ(PIPELINE_ERROR_REQUIRED_FILTER_MISSING, | 230 EXPECT_EQ(PIPELINE_ERROR_REQUIRED_FILTER_MISSING, |
| 231 pipeline_.GetError()); | 231 pipeline_.GetError()); |
| 232 } | 232 } |
| 233 | 233 |
| 234 TEST_F(PipelineImplTest, URLNotFound) { | 234 TEST_F(PipelineImplTest, URLNotFound) { |
| 235 EXPECT_CALL(*mocks_->data_source(), Initialize("", NotNull())) | 235 EXPECT_CALL(*mocks_->data_source(), Initialize("", NotNull())) |
| 236 .WillOnce(DoAll(Error(mocks_->data_source(), | 236 .WillOnce(DoAll(SetError(mocks_->data_source(), |
| 237 PIPELINE_ERROR_URL_NOT_FOUND), | 237 PIPELINE_ERROR_URL_NOT_FOUND), |
| 238 Invoke(&RunFilterCallback))); | 238 Invoke(&RunFilterCallback))); |
| 239 EXPECT_CALL(*mocks_->data_source(), Stop()); | 239 EXPECT_CALL(*mocks_->data_source(), Stop()); |
| 240 | 240 |
| 241 InitializePipeline(); | 241 InitializePipeline(); |
| 242 EXPECT_FALSE(pipeline_.IsInitialized()); | 242 EXPECT_FALSE(pipeline_.IsInitialized()); |
| 243 EXPECT_EQ(PIPELINE_ERROR_URL_NOT_FOUND, pipeline_.GetError()); | 243 EXPECT_EQ(PIPELINE_ERROR_URL_NOT_FOUND, pipeline_.GetError()); |
| 244 } | 244 } |
| 245 | 245 |
| 246 TEST_F(PipelineImplTest, NoStreams) { | 246 TEST_F(PipelineImplTest, NoStreams) { |
| 247 // Manually set these expecations because SetPlaybackRate() is not called if | 247 // Manually set these expecations because SetPlaybackRate() is not called if |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 // The audio renderer should receive a call to SetVolume(). | 376 // The audio renderer should receive a call to SetVolume(). |
| 377 float expected = 0.5f; | 377 float expected = 0.5f; |
| 378 EXPECT_CALL(*mocks_->audio_renderer(), SetVolume(expected)); | 378 EXPECT_CALL(*mocks_->audio_renderer(), SetVolume(expected)); |
| 379 | 379 |
| 380 // Initialize then set volume! | 380 // Initialize then set volume! |
| 381 InitializePipeline(); | 381 InitializePipeline(); |
| 382 pipeline_.SetVolume(expected); | 382 pipeline_.SetVolume(expected); |
| 383 } | 383 } |
| 384 | 384 |
| 385 } // namespace media | 385 } // namespace media |
| OLD | NEW |