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

Unified Diff: base/string_split_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 | « base/string_split.cc ('k') | chrome/common/extensions/api/extension_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_split_unittest.cc
diff --git a/base/string_split_unittest.cc b/base/string_split_unittest.cc
index 5d4dafe9a6f6a4e214d78ada57a4231bcfa9c894..83e4d7449d83034a2450e4db000189005792e99e 100644
--- a/base/string_split_unittest.cc
+++ b/base/string_split_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.
@@ -163,7 +163,8 @@ TEST(StringUtilTest, SplitString) {
std::vector<std::wstring> r;
SplitString(L"", L',', &r);
- EXPECT_EQ(0U, r.size());
+ ASSERT_EQ(1U, r.size());
+ EXPECT_EQ(r[0], L"");
r.clear();
SplitString(L"a,b,c", L',', &r);
@@ -187,8 +188,9 @@ TEST(StringUtilTest, SplitString) {
EXPECT_EQ(r[2], L"c");
r.clear();
- SplitString(L" ", L'*', &r);
- EXPECT_EQ(0U, r.size());
+ SplitString(L"", L'*', &r);
+ ASSERT_EQ(1U, r.size());
+ EXPECT_EQ(r[0], L"");
r.clear();
SplitString(L"foo", L'*', &r);
@@ -264,17 +266,12 @@ TEST(SplitStringUsingSubstrTest, TrailingDelimitersSkipped) {
TEST(StringSplitTest, StringSplitDontTrim) {
std::vector<std::string> r;
- SplitStringDontTrim(" ", '*', &r);
- ASSERT_EQ(1U, r.size());
- EXPECT_EQ(r[0], " ");
- r.clear();
-
- SplitStringDontTrim("\t \ta\t ", '\t', &r);
+ SplitStringDontTrim("\t\ta\t", '\t', &r);
ASSERT_EQ(4U, r.size());
EXPECT_EQ(r[0], "");
- EXPECT_EQ(r[1], " ");
+ EXPECT_EQ(r[1], "");
EXPECT_EQ(r[2], "a");
- EXPECT_EQ(r[3], " ");
+ EXPECT_EQ(r[3], "");
r.clear();
SplitStringDontTrim("\ta\t\nb\tcc", '\n', &r);
« no previous file with comments | « base/string_split.cc ('k') | chrome/common/extensions/api/extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698