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

Side by Side Diff: media/formats/webm/webm_content_encodings_client_unittest.cc

Issue 1235793005: Deprecate LogCB in favor of using MediaLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and attempt to fix Android compilation Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "media/formats/webm/webm_constants.h" 6 #include "media/formats/webm/webm_constants.h"
7 #include "media/formats/webm/webm_content_encodings_client.h" 7 #include "media/formats/webm/webm_content_encodings_client.h"
8 #include "media/formats/webm/webm_parser.h" 8 #include "media/formats/webm/webm_parser.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace media { 11 namespace media {
12 12
13 class WebMContentEncodingsClientTest : public testing::Test { 13 class WebMContentEncodingsClientTest : public testing::Test {
14 public: 14 public:
15 WebMContentEncodingsClientTest() 15 WebMContentEncodingsClientTest()
16 : client_(LogCB()), 16 : client_(new MediaLog()), parser_(kWebMIdContentEncodings, &client_) {}
17 parser_(kWebMIdContentEncodings, &client_) {}
18 17
19 void ParseAndExpectToFail(const uint8* buf, int size) { 18 void ParseAndExpectToFail(const uint8* buf, int size) {
20 int result = parser_.Parse(buf, size); 19 int result = parser_.Parse(buf, size);
21 EXPECT_EQ(-1, result); 20 EXPECT_EQ(-1, result);
22 } 21 }
23 22
24 protected: 23 protected:
25 WebMContentEncodingsClient client_; 24 WebMContentEncodingsClient client_;
26 WebMListParser parser_; 25 WebMListParser parser_;
27 }; 26 };
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 0x50, 0x35, 0x8F, // ContentEncryption (size = 15) 228 0x50, 0x35, 0x8F, // ContentEncryption (size = 15)
230 0x47, 0xE1, 0x81, 0xEE, // ContentEncAlgo (size = 1), invalid 229 0x47, 0xE1, 0x81, 0xEE, // ContentEncAlgo (size = 1), invalid
231 0x47, 0xE2, 0x88, // ContentEncKeyID (size = 8) 230 0x47, 0xE2, 0x88, // ContentEncKeyID (size = 8)
232 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 231 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
233 }; 232 };
234 int size = sizeof(kContentEncodings); 233 int size = sizeof(kContentEncodings);
235 ParseAndExpectToFail(kContentEncodings, size); 234 ParseAndExpectToFail(kContentEncodings, size);
236 } 235 }
237 236
238 } // namespace media 237 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/webm/webm_content_encodings_client.cc ('k') | media/formats/webm/webm_stream_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698