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

Side by Side Diff: media/webm/webm_cluster_parser_unittest.cc

Issue 10826098: Use std::string for decryption key ID in webm parser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/webm/webm_cluster_parser.cc ('k') | media/webm/webm_content_encodings.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <algorithm>
6
5 #include "base/logging.h" 7 #include "base/logging.h"
6 #include "media/webm/cluster_builder.h" 8 #include "media/webm/cluster_builder.h"
7 #include "media/webm/webm_cluster_parser.h" 9 #include "media/webm/webm_cluster_parser.h"
8 #include "media/webm/webm_constants.h" 10 #include "media/webm/webm_constants.h"
9 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
11 13
12 using ::testing::InSequence; 14 using ::testing::InSequence;
13 using ::testing::Return; 15 using ::testing::Return;
14 using ::testing::_; 16 using ::testing::_;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 dest->push_back(*itr); 120 dest->push_back(*itr);
119 } 121 }
120 } 122 }
121 123
122 class WebMClusterParserTest : public testing::Test { 124 class WebMClusterParserTest : public testing::Test {
123 public: 125 public:
124 WebMClusterParserTest() 126 WebMClusterParserTest()
125 : parser_(new WebMClusterParser(kTimecodeScale, 127 : parser_(new WebMClusterParser(kTimecodeScale,
126 kAudioTrackNum, 128 kAudioTrackNum,
127 kVideoTrackNum, 129 kVideoTrackNum,
128 NULL, 0)) { 130 std::string())) {
129 } 131 }
130 132
131 protected: 133 protected:
132 scoped_ptr<WebMClusterParser> parser_; 134 scoped_ptr<WebMClusterParser> parser_;
133 }; 135 };
134 136
135 TEST_F(WebMClusterParserTest, TestReset) { 137 TEST_F(WebMClusterParserTest, TestReset) {
136 InSequence s; 138 InSequence s;
137 139
138 int block_count = arraysize(kDefaultBlockInfo); 140 int block_count = arraysize(kDefaultBlockInfo);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 }; 241 };
240 int block_count = arraysize(kBlockInfo); 242 int block_count = arraysize(kBlockInfo);
241 scoped_ptr<Cluster> cluster(CreateCluster(0, kBlockInfo, block_count)); 243 scoped_ptr<Cluster> cluster(CreateCluster(0, kBlockInfo, block_count));
242 244
243 int result = parser_->Parse(cluster->data(), cluster->size()); 245 int result = parser_->Parse(cluster->data(), cluster->size());
244 EXPECT_EQ(cluster->size(), result); 246 EXPECT_EQ(cluster->size(), result);
245 ASSERT_TRUE(VerifyBuffers(parser_, kBlockInfo, block_count)); 247 ASSERT_TRUE(VerifyBuffers(parser_, kBlockInfo, block_count));
246 } 248 }
247 249
248 } // namespace media 250 } // namespace media
OLDNEW
« no previous file with comments | « media/webm/webm_cluster_parser.cc ('k') | media/webm/webm_content_encodings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698