summaryrefslogtreecommitdiff
path: root/chromium/media/base/test_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/media/base/test_helpers.h')
-rw-r--r--chromium/media/base/test_helpers.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/chromium/media/base/test_helpers.h b/chromium/media/base/test_helpers.h
index d2143409117..3a0df8eda59 100644
--- a/chromium/media/base/test_helpers.h
+++ b/chromium/media/base/test_helpers.h
@@ -110,6 +110,11 @@ class TestVideoConfig {
static VideoDecoderConfig ExtraLarge(VideoCodec codec = kCodecVP8);
static VideoDecoderConfig ExtraLargeEncrypted(VideoCodec codec = kCodecVP8);
+ static VideoDecoderConfig Custom(gfx::Size size,
+ VideoCodec codec = kCodecVP8);
+ static VideoDecoderConfig CustomEncrypted(gfx::Size size,
+ VideoCodec codec = kCodecVP8);
+
// Returns coded size for Normal and Large config.
static gfx::Size NormalCodedSize();
static gfx::Size LargeCodedSize();
@@ -219,7 +224,7 @@ MATCHER_P(SameStatusCode, status, "") {
return arg.code() == status.code();
}
-// Compares two an |arg| Status to a StatusCode provided
+// Compares an `arg` Status.code() to a test-supplied StatusCode.
MATCHER_P(HasStatusCode, status_code, "") {
return arg.code() == status_code;
}
@@ -228,6 +233,12 @@ MATCHER(IsOkStatus, "") {
return arg.is_ok();
}
+// True if and only if the Status would be interpreted as an error from a decode
+// callback (not okay, not aborted).
+MATCHER(IsDecodeErrorStatus, "") {
+ return !arg.is_ok() && arg.code() != StatusCode::kAborted;
+}
+
// Compares two {Audio|Video}DecoderConfigs
MATCHER_P(DecoderConfigEq, config, "") {
return arg.Matches(config);