summaryrefslogtreecommitdiffstats
path: root/base/string_split_unittest.cc
diff options
context:
space:
mode:
authordpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-31 00:44:24 +0000
committerdpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-31 00:44:24 +0000
commita8aa85beefc6146c3881fb41e14a60cfff8b9710 (patch)
treea2ca5835e32c0463489c3a2663616e9e771dfa0f /base/string_split_unittest.cc
parent563fb5fc1b451d356fcf5e5ced3591b7181d3874 (diff)
downloadchromium_src-a8aa85beefc6146c3881fb41e14a60cfff8b9710.zip
chromium_src-a8aa85beefc6146c3881fb41e14a60cfff8b9710.tar.gz
chromium_src-a8aa85beefc6146c3881fb41e14a60cfff8b9710.tar.bz2
Revert r12998 - it broke some media/mime-related layout tests.
TBR=pkasting@chromium.org, scherkus@chromium.org Review URL: https://chromiumcodereview.appspot.com/9950039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130011 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_split_unittest.cc')
-rw-r--r--base/string_split_unittest.cc21
1 files changed, 9 insertions, 12 deletions
diff --git a/base/string_split_unittest.cc b/base/string_split_unittest.cc
index 5d4dafe..83e4d74 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);