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

Unified Diff: net/base/mime_util_unittest.cc

Issue 9950039: Revert r12998 - it broke some media/mime-related layout tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
« no previous file with comments | « net/base/mime_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_util_unittest.cc
diff --git a/net/base/mime_util_unittest.cc b/net/base/mime_util_unittest.cc
index c647294a9c9c3db3662c111b26b888cbb7523381..a63c39e9c0dcfac2856bf3f013149987acbbcf83 100644
--- a/net/base/mime_util_unittest.cc
+++ b/net/base/mime_util_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -104,26 +104,26 @@ TEST(MimeUtilTest, ParseCodecString) {
{ "\"mp4v.20.240, mp4a.40.2\"", 2, { "mp4v", "mp4a" } },
{ "mp4v.20.8, samr", 2, { "mp4v", "samr" } },
{ "\"theora, vorbis\"", 2, { "theora", "vorbis" } },
- { "", 0, { } },
- { "\"\"", 0, { } },
- { "\" \"", 0, { } },
+ { "", 1, { "" } },
+ { "\"\"", 1, { "" } },
{ ",", 2, { "", "" } },
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
std::vector<std::string> codecs_out;
ParseCodecString(tests[i].original, &codecs_out, true);
- ASSERT_EQ(tests[i].expected_size, codecs_out.size());
- for (size_t j = 0; j < tests[i].expected_size; ++j)
+ EXPECT_EQ(tests[i].expected_size, codecs_out.size());
+ for (size_t j = 0; j < tests[i].expected_size; ++j) {
EXPECT_EQ(tests[i].results[j], codecs_out[j]);
+ }
}
// Test without stripping the codec type.
std::vector<std::string> codecs_out;
ParseCodecString("avc1.42E01E, mp4a.40.2", &codecs_out, false);
- ASSERT_EQ(2u, codecs_out.size());
- EXPECT_EQ("avc1.42E01E", codecs_out[0]);
- EXPECT_EQ("mp4a.40.2", codecs_out[1]);
+ EXPECT_EQ(2u, codecs_out.size());
+ EXPECT_STREQ("avc1.42E01E", codecs_out[0].c_str());
+ EXPECT_STREQ("mp4a.40.2", codecs_out[1].c_str());
}
} // namespace net
« no previous file with comments | « net/base/mime_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698