OLD | NEW |
1 | 1 |
2 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
10 #include "media/base/clock_impl.h" | 10 #include "media/base/clock_impl.h" |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 349 |
350 TEST_F(PipelineImplTest, RequiredFilterMissing) { | 350 TEST_F(PipelineImplTest, RequiredFilterMissing) { |
351 EXPECT_CALL(callbacks_, OnError()); | 351 EXPECT_CALL(callbacks_, OnError()); |
352 | 352 |
353 // Sets up expectations on the callback and initializes the pipeline. Called | 353 // Sets up expectations on the callback and initializes the pipeline. Called |
354 // after tests have set expectations any filters they wish to use. | 354 // after tests have set expectations any filters they wish to use. |
355 // Expect an initialization callback. | 355 // Expect an initialization callback. |
356 EXPECT_CALL(callbacks_, OnStart()); | 356 EXPECT_CALL(callbacks_, OnStart()); |
357 | 357 |
358 // Create a filter collection with missing filter. | 358 // Create a filter collection with missing filter. |
359 MediaFilterCollection* collection = mocks_->filter_collection(false); | 359 FilterCollection* collection = mocks_->filter_collection(false); |
360 pipeline_->Start(collection, "", | 360 pipeline_->Start(collection, "", |
361 NewCallback(reinterpret_cast<CallbackHelper*>(&callbacks_), | 361 NewCallback(reinterpret_cast<CallbackHelper*>(&callbacks_), |
362 &CallbackHelper::OnStart)); | 362 &CallbackHelper::OnStart)); |
363 message_loop_.RunAllPending(); | 363 message_loop_.RunAllPending(); |
364 | 364 |
365 EXPECT_FALSE(pipeline_->IsInitialized()); | 365 EXPECT_FALSE(pipeline_->IsInitialized()); |
366 EXPECT_EQ(PIPELINE_ERROR_REQUIRED_FILTER_MISSING, | 366 EXPECT_EQ(PIPELINE_ERROR_REQUIRED_FILTER_MISSING, |
367 pipeline_->GetError()); | 367 pipeline_->GetError()); |
368 } | 368 } |
369 | 369 |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 // Signal end of video stream and make sure OnEnded() callback occurs. | 747 // Signal end of video stream and make sure OnEnded() callback occurs. |
748 EXPECT_CALL(*mocks_->audio_renderer(), HasEnded()) | 748 EXPECT_CALL(*mocks_->audio_renderer(), HasEnded()) |
749 .WillOnce(Return(true)); | 749 .WillOnce(Return(true)); |
750 EXPECT_CALL(*mocks_->video_renderer(), HasEnded()) | 750 EXPECT_CALL(*mocks_->video_renderer(), HasEnded()) |
751 .WillOnce(Return(true)); | 751 .WillOnce(Return(true)); |
752 EXPECT_CALL(callbacks_, OnEnded()); | 752 EXPECT_CALL(callbacks_, OnEnded()); |
753 host->NotifyEnded(); | 753 host->NotifyEnded(); |
754 } | 754 } |
755 | 755 |
756 } // namespace media | 756 } // namespace media |
OLD | NEW |