summaryrefslogtreecommitdiffstats
path: root/media/base/test_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/base/test_helpers.h')
-rw-r--r--media/base/test_helpers.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/media/base/test_helpers.h b/media/base/test_helpers.h
index 097c5f8..bc505d4 100644
--- a/media/base/test_helpers.h
+++ b/media/base/test_helpers.h
@@ -5,9 +5,12 @@
#ifndef MEDIA_BASE_TEST_HELPERS_H_
#define MEDIA_BASE_TEST_HELPERS_H_
+#include "base/basictypes.h"
#include "base/callback.h"
#include "media/base/pipeline_status.h"
+#include "media/base/video_decoder_config.h"
#include "testing/gmock/include/gmock/gmock.h"
+#include "ui/gfx/size.h"
namespace base {
class MessageLoop;
@@ -54,6 +57,28 @@ class WaitableMessageLoopEvent {
DISALLOW_COPY_AND_ASSIGN(WaitableMessageLoopEvent);
};
+// Provides pre-canned VideoDecoderConfig. These types are used for tests that
+// don't care about detailed parameters of the config.
+class TestVideoConfig {
+ public:
+ // Returns a configuration that is invalid.
+ static VideoDecoderConfig Invalid();
+
+ static VideoDecoderConfig Normal();
+ static VideoDecoderConfig NormalEncrypted();
+
+ // Returns a configuration that is larger in dimensions than Normal().
+ static VideoDecoderConfig Large();
+ static VideoDecoderConfig LargeEncrypted();
+
+ // Returns coded size for Normal and Large config.
+ static gfx::Size NormalCodedSize();
+ static gfx::Size LargeCodedSize();
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(TestVideoConfig);
+};
+
} // namespace media
#endif // MEDIA_BASE_TEST_HELPERS_H_