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

Unified Diff: media/base/pipeline_impl_unittest.cc

Issue 8686010: <video> decode in hardware! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Drop INTRA/CONSTRAINED in profile, add missing 'virtual', add MEDIA_EXPORT, fix RemoveFilter loop Created 9 years 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 side-by-side diff with in-line comments
Download patch
Index: media/base/pipeline_impl_unittest.cc
diff --git a/media/base/pipeline_impl_unittest.cc b/media/base/pipeline_impl_unittest.cc
index fc9692efd1c4cf7c776b6a1b13a91aea5b1ed4e0..e27bddafc84da056a5914531dbab0d99373af1e4 100644
--- a/media/base/pipeline_impl_unittest.cc
+++ b/media/base/pipeline_impl_unittest.cc
@@ -21,11 +21,13 @@ using ::testing::_;
using ::testing::DeleteArg;
using ::testing::InSequence;
using ::testing::Invoke;
+using ::testing::InvokeArgument;
using ::testing::Mock;
using ::testing::NotNull;
using ::testing::Return;
using ::testing::ReturnRef;
using ::testing::StrictMock;
+using ::testing::WithArg;
namespace media {
@@ -52,6 +54,11 @@ class CallbackHelper {
DISALLOW_COPY_AND_ASSIGN(CallbackHelper);
};
+// Run |cb| w/ OK status.
+static void RunPipelineStatusOKCB(const PipelineStatusCB& cb) {
+ cb.Run(PIPELINE_OK);
+}
+
// TODO(scherkus): even though some filters are initialized on separate
// threads these test aren't flaky... why? It's because filters' Initialize()
// is executed on |message_loop_| and the mock filters instantly call
@@ -126,7 +133,7 @@ class PipelineImplTest : public ::testing::Test {
void InitializeVideoDecoder(MockDemuxerStream* stream) {
EXPECT_CALL(*mocks_->video_decoder(),
Initialize(stream, _, _))
- .WillOnce(Invoke(&RunFilterCallback3));
+ .WillOnce(WithArg<1>(Invoke(&RunPipelineStatusOKCB)));
EXPECT_CALL(*mocks_->video_decoder(), SetPlaybackRate(0.0f));
EXPECT_CALL(*mocks_->video_decoder(),
Seek(mocks_->demuxer()->GetStartTime(), _))

Powered by Google App Engine
This is Rietveld 408576698