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

Unified Diff: media/formats/webm/webm_content_encodings_client_unittest.cc

Issue 1310423003: Revert of MSE: Verify MediaLog events created by existing WebM unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months 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/formats/webm/webm_content_encodings_client_unittest.cc
diff --git a/media/formats/webm/webm_content_encodings_client_unittest.cc b/media/formats/webm/webm_content_encodings_client_unittest.cc
index d31ad278b9e821c4af210c8fd21fe918563c4f8e..22049ebfce74ec0bf1faaa84132342de180a3a7f 100644
--- a/media/formats/webm/webm_content_encodings_client_unittest.cc
+++ b/media/formats/webm/webm_content_encodings_client_unittest.cc
@@ -2,56 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/bind.h"
+#include "media/formats/webm/webm_constants.h"
#include "media/formats/webm/webm_content_encodings_client.h"
-
-#include <string>
-
-#include "base/bind.h"
-#include "base/strings/string_number_conversions.h"
-#include "media/base/mock_media_log.h"
-#include "media/formats/webm/webm_constants.h"
#include "media/formats/webm/webm_parser.h"
-#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-using ::testing::StrictMock;
-
namespace media {
-
-// Matchers for verifying common media log entry strings.
-MATCHER(MissingContentEncoding, "") {
- return CONTAINS_STRING(arg, "Missing ContentEncoding.");
-}
-
-MATCHER(UnexpectedContentEncodingOrder, "") {
- return CONTAINS_STRING(arg, "Unexpected ContentEncodingOrder.");
-}
-
-MATCHER(UnexpectedContentEncodingScope, "") {
- return CONTAINS_STRING(arg, "Unexpected ContentEncodingScope.");
-}
-
-MATCHER(ContentCompressionNotSupported, "") {
- return CONTAINS_STRING(arg, "ContentCompression not supported.");
-}
-
-MATCHER(MissingContentEncryption, "") {
- return CONTAINS_STRING(
- arg,
- "ContentEncodingType is encryption but ContentEncryption is missing.");
-}
-
-MATCHER_P(UnexpectedContentEncAlgo, algo, "") {
- return CONTAINS_STRING(
- arg, "Unexpected ContentEncAlgo " + base::IntToString(algo) + ".");
-}
class WebMContentEncodingsClientTest : public testing::Test {
public:
WebMContentEncodingsClientTest()
- : media_log_(new StrictMock<MockMediaLog>()),
- client_(media_log_),
- parser_(kWebMIdContentEncodings, &client_) {}
+ : client_(new MediaLog()), parser_(kWebMIdContentEncodings, &client_) {}
void ParseAndExpectToFail(const uint8* buf, int size) {
int result = parser_.Parse(buf, size);
@@ -59,7 +21,6 @@
}
protected:
- scoped_refptr<StrictMock<MockMediaLog>> media_log_;
WebMContentEncodingsClient client_;
WebMListParser parser_;
};
@@ -69,7 +30,6 @@
0x6D, 0x80, 0x80, // ContentEncodings (size = 0)
};
int size = sizeof(kContentEncodings);
- EXPECT_MEDIA_LOG(MissingContentEncoding());
ParseAndExpectToFail(kContentEncodings, size);
}
@@ -222,7 +182,6 @@
0x50, 0x35, 0x80, // ContentEncryption (size = 0)
};
int size = sizeof(kContentEncodings);
- EXPECT_MEDIA_LOG(UnexpectedContentEncodingOrder());
ParseAndExpectToFail(kContentEncodings, size);
}
@@ -235,7 +194,6 @@
0x50, 0x35, 0x80, // ContentEncryption (size = 0)
};
int size = sizeof(kContentEncodings);
- EXPECT_MEDIA_LOG(UnexpectedContentEncodingScope());
ParseAndExpectToFail(kContentEncodings, size);
}
@@ -247,7 +205,6 @@
0x50, 0x35, 0x80, // ContentEncryption (size = 0)
};
int size = sizeof(kContentEncodings);
- EXPECT_MEDIA_LOG(ContentCompressionNotSupported());
ParseAndExpectToFail(kContentEncodings, size);
}
@@ -260,7 +217,6 @@
// ContentEncryption missing
};
int size = sizeof(kContentEncodings);
- EXPECT_MEDIA_LOG(MissingContentEncryption());
ParseAndExpectToFail(kContentEncodings, size);
}
@@ -275,7 +231,6 @@
0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
};
int size = sizeof(kContentEncodings);
- EXPECT_MEDIA_LOG(UnexpectedContentEncAlgo(0xEE));
ParseAndExpectToFail(kContentEncodings, size);
}
« no previous file with comments | « media/formats/webm/webm_cluster_parser_unittest.cc ('k') | media/formats/webm/webm_tracks_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698