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

Side by Side Diff: net/base/mime_util_unittest.cc

Issue 2093007: Chromium side changes for enabling VP8 and WebM support. (Closed)
Patch Set: Final fixes Created 10 years, 7 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
« no previous file with comments | « net/base/mime_util.cc ('k') | third_party/ffmpeg/ffmpeg.gyp » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "net/base/mime_util.h" 6 #include "net/base/mime_util.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace { 9 namespace {
10 class MimeUtilTest : public testing::Test { 10 class MimeUtilTest : public testing::Test {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 { "\"mp4v.20.240, mp4a.40.2\"", 2, { "mp4v", "mp4a" } }, 111 { "\"mp4v.20.240, mp4a.40.2\"", 2, { "mp4v", "mp4a" } },
112 { "mp4v.20.8, samr", 2, { "mp4v", "samr" } }, 112 { "mp4v.20.8, samr", 2, { "mp4v", "samr" } },
113 { "\"theora, vorbis\"", 2, { "theora", "vorbis" } }, 113 { "\"theora, vorbis\"", 2, { "theora", "vorbis" } },
114 { "", 1, { "" } }, 114 { "", 1, { "" } },
115 { "\"\"", 1, { "" } }, 115 { "\"\"", 1, { "" } },
116 { ",", 2, { "", "" } }, 116 { ",", 2, { "", "" } },
117 }; 117 };
118 118
119 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { 119 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
120 std::vector<std::string> codecs_out; 120 std::vector<std::string> codecs_out;
121 net::ParseCodecString(tests[i].original, &codecs_out); 121 net::ParseCodecString(tests[i].original, &codecs_out, true);
122 EXPECT_EQ(tests[i].expected_size, codecs_out.size()); 122 EXPECT_EQ(tests[i].expected_size, codecs_out.size());
123 for (size_t j = 0; j < tests[i].expected_size; ++j) { 123 for (size_t j = 0; j < tests[i].expected_size; ++j) {
124 EXPECT_EQ(tests[i].results[j], codecs_out[j]); 124 EXPECT_EQ(tests[i].results[j], codecs_out[j]);
125 } 125 }
126 } 126 }
127
128 // Test without stripping the codec type.
129 std::vector<std::string> codecs_out;
130 net::ParseCodecString("avc1.42E01E, mp4a.40.2", &codecs_out, false);
131 EXPECT_EQ(2u, codecs_out.size());
132 EXPECT_STREQ("avc1.42E01E", codecs_out[0].c_str());
133 EXPECT_STREQ("mp4a.40.2", codecs_out[1].c_str());
127 } 134 }
OLDNEW
« no previous file with comments | « net/base/mime_util.cc ('k') | third_party/ffmpeg/ffmpeg.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698