summaryrefslogtreecommitdiffstats
path: root/media/base
diff options
context:
space:
mode:
Diffstat (limited to 'media/base')
-rw-r--r--media/base/mock_media_filters.h9
-rw-r--r--media/base/pipeline_impl_unittest.cc11
-rw-r--r--media/base/video_frame_impl_unittest.cc4
3 files changed, 17 insertions, 7 deletions
diff --git a/media/base/mock_media_filters.h b/media/base/mock_media_filters.h
index 1d215c4..b8a8f74 100644
--- a/media/base/mock_media_filters.h
+++ b/media/base/mock_media_filters.h
@@ -1,6 +1,11 @@
// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
+//
+// TODO(ajwong): This whole file is deprecated in favor or gmock style mocks.
+// The deprecated classes have been moved into the old_mocks to avoid colliding
+// with the newer mock classes. Once all the unittests have been migrated, this
+// should be deleted.
#ifndef MEDIA_BASE_MOCK_MEDIA_FILTERS_H_
#define MEDIA_BASE_MOCK_MEDIA_FILTERS_H_
@@ -20,6 +25,8 @@
namespace media {
+namespace old_mocks {
+
// Behaviors for MockDataSource filter.
enum MockDataSourceBehavior {
MOCK_DATA_SOURCE_NORMAL_INIT,
@@ -667,6 +674,8 @@ class InitializationHelper {
DISALLOW_COPY_AND_ASSIGN(InitializationHelper);
};
+} // namespace old_mocks
+
} // namespace media
#endif // MEDIA_BASE_MOCK_MEDIA_FILTERS_H_
diff --git a/media/base/pipeline_impl_unittest.cc b/media/base/pipeline_impl_unittest.cc
index adfc3a6..f28ee1c 100644
--- a/media/base/pipeline_impl_unittest.cc
+++ b/media/base/pipeline_impl_unittest.cc
@@ -36,7 +36,7 @@ class PipelineImplTest : public testing::Test {
// was executed, false otherwise.
bool InitializeAndWait() {
DCHECK(!filters_);
- filters_ = new media::MockFilterFactory(&config_);
+ filters_ = new media::old_mocks::MockFilterFactory(&config_);
pipeline_.Start(filters_, "",
NewCallback(this, &PipelineImplTest::OnInitialize));
return initialize_event_.TimedWait(base::TimeDelta::FromMilliseconds(500));
@@ -51,8 +51,8 @@ class PipelineImplTest : public testing::Test {
// Fixture members.
media::PipelineImpl pipeline_;
- scoped_refptr<media::MockFilterFactory> filters_;
- media::MockFilterConfig config_;
+ scoped_refptr<media::old_mocks::MockFilterFactory> filters_;
+ media::old_mocks::MockFilterConfig config_;
bool initialize_result_;
bool seek_result_;
@@ -75,7 +75,7 @@ class PipelineImplTest : public testing::Test {
};
TEST_F(PipelineImplTest, NeverInitializes) {
- config_.data_source_behavior = media::MOCK_DATA_SOURCE_NEVER_INIT;
+ config_.data_source_behavior = media::old_mocks::MOCK_DATA_SOURCE_NEVER_INIT;
// This test hangs during initialization by never calling
// InitializationComplete(). Make sure we tear down the pipeline properly.
@@ -96,7 +96,8 @@ TEST_F(PipelineImplTest, RequiredFilterMissing) {
}
TEST_F(PipelineImplTest, URLNotFound) {
- config_.data_source_behavior = media::MOCK_DATA_SOURCE_URL_ERROR_IN_INIT;
+ config_.data_source_behavior =
+ media::old_mocks::MOCK_DATA_SOURCE_URL_ERROR_IN_INIT;
ASSERT_TRUE(InitializeAndWait());
EXPECT_FALSE(initialize_result_);
diff --git a/media/base/video_frame_impl_unittest.cc b/media/base/video_frame_impl_unittest.cc
index fe0d37c..a6a1a6a 100644
--- a/media/base/video_frame_impl_unittest.cc
+++ b/media/base/video_frame_impl_unittest.cc
@@ -98,9 +98,9 @@ TEST(VideoFrameImpl, Basic) {
EXPECT_FALSE(frame->IsDiscontinuous());
// Test VideoFrame implementation.
- media::MockVideoDecoder::InitializeYV12Frame(frame, 0.0f);
+ media::old_mocks::MockVideoDecoder::InitializeYV12Frame(frame, 0.0f);
ExpectFrameColor(frame, 0xFF000000);
- media::MockVideoDecoder::InitializeYV12Frame(frame, 1.0f);
+ media::old_mocks::MockVideoDecoder::InitializeYV12Frame(frame, 1.0f);
ExpectFrameColor(frame, 0xFFFFFFFF);
// Test an empty frame.