OLD | NEW |
---|---|
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> | 5 #include <algorithm> |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "media/webm/cluster_builder.h" | 8 #include "media/webm/cluster_builder.h" |
9 #include "media/webm/webm_cluster_parser.h" | 9 #include "media/webm/webm_cluster_parser.h" |
10 #include "media/webm/webm_constants.h" | 10 #include "media/webm/webm_constants.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
120 dest->push_back(*itr); | 120 dest->push_back(*itr); |
121 } | 121 } |
122 } | 122 } |
123 | 123 |
124 class WebMClusterParserTest : public testing::Test { | 124 class WebMClusterParserTest : public testing::Test { |
125 public: | 125 public: |
126 WebMClusterParserTest() | 126 WebMClusterParserTest() |
127 : parser_(new WebMClusterParser(kTimecodeScale, | 127 : parser_(new WebMClusterParser(kTimecodeScale, |
128 kAudioTrackNum, | 128 kAudioTrackNum, |
129 kVideoTrackNum, | 129 kVideoTrackNum, |
130 std::string(), | |
acolwell GONE FROM CHROMIUM
2012/10/10 16:00:06
nit: use "" instead here and below.
xhwang
2012/10/11 00:49:41
Done.
| |
130 std::string())) { | 131 std::string())) { |
131 } | 132 } |
132 | 133 |
133 protected: | 134 protected: |
134 scoped_ptr<WebMClusterParser> parser_; | 135 scoped_ptr<WebMClusterParser> parser_; |
135 }; | 136 }; |
136 | 137 |
137 TEST_F(WebMClusterParserTest, TestReset) { | 138 TEST_F(WebMClusterParserTest, TestReset) { |
138 InSequence s; | 139 InSequence s; |
139 | 140 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
241 }; | 242 }; |
242 int block_count = arraysize(kBlockInfo); | 243 int block_count = arraysize(kBlockInfo); |
243 scoped_ptr<Cluster> cluster(CreateCluster(0, kBlockInfo, block_count)); | 244 scoped_ptr<Cluster> cluster(CreateCluster(0, kBlockInfo, block_count)); |
244 | 245 |
245 int result = parser_->Parse(cluster->data(), cluster->size()); | 246 int result = parser_->Parse(cluster->data(), cluster->size()); |
246 EXPECT_EQ(cluster->size(), result); | 247 EXPECT_EQ(cluster->size(), result); |
247 ASSERT_TRUE(VerifyBuffers(parser_, kBlockInfo, block_count)); | 248 ASSERT_TRUE(VerifyBuffers(parser_, kBlockInfo, block_count)); |
248 } | 249 } |
249 | 250 |
250 } // namespace media | 251 } // namespace media |
OLD | NEW |