summaryrefslogtreecommitdiffstats
path: root/base/string_util_unittest.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 03:02:10 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 03:02:10 +0000
commitea4a1d01a2d1aad09c92821a51bb44c4412785f8 (patch)
treed1ab077a0dd553fb5c8f81c489dd8f90693ed72f /base/string_util_unittest.cc
parent1961e77be011903324a97da5354d267b0fae1904 (diff)
downloadchromium_src-ea4a1d01a2d1aad09c92821a51bb44c4412785f8.zip
chromium_src-ea4a1d01a2d1aad09c92821a51bb44c4412785f8.tar.gz
chromium_src-ea4a1d01a2d1aad09c92821a51bb44c4412785f8.tar.bz2
Revert r42300: "HttpRequestHeaders refactor."
Broke access-control-basic-whitelist-request-headers.html layout test. BUG=22588 Review URL: http://codereview.chromium.org/1110012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42305 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util_unittest.cc')
-rw-r--r--base/string_util_unittest.cc50
1 files changed, 1 insertions, 49 deletions
diff --git a/base/string_util_unittest.cc b/base/string_util_unittest.cc
index 8fc8f15..78939f5 100644
--- a/base/string_util_unittest.cc
+++ b/base/string_util_unittest.cc
@@ -11,11 +11,8 @@
#include "base/basictypes.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-using ::testing::ElementsAre;
-
namespace base {
namespace {
@@ -1495,49 +1492,4 @@ TEST(StringUtilTest, ContainsOnlyChars) {
EXPECT_FALSE(ContainsOnlyChars("123a", "4321"));
}
-TEST(SplitStringUsingSubstrTest, EmptyString) {
- std::vector<std::string> results;
- SplitStringUsingSubstr("", "DELIMITER", &results);
- ASSERT_EQ(1u, results.size());
- EXPECT_THAT(results, ElementsAre(""));
-}
-
-TEST(SplitStringUsingSubstrTest, StringWithNoDelimiter) {
- std::vector<std::string> results;
- SplitStringUsingSubstr("alongwordwithnodelimiter", "DELIMITER", &results);
- ASSERT_EQ(1u, results.size());
- EXPECT_THAT(results, ElementsAre("alongwordwithnodelimiter"));
-}
-
-TEST(SplitStringUsingSubstrTest, LeadingDelimitersSkipped) {
- std::vector<std::string> results;
- SplitStringUsingSubstr(
- "DELIMITERDELIMITERDELIMITERoneDELIMITERtwoDELIMITERthree",
- "DELIMITER",
- &results);
- ASSERT_EQ(6u, results.size());
- EXPECT_THAT(results, ElementsAre("", "", "", "one", "two", "three"));
-}
-
-TEST(SplitStringUsingSubstrTest, ConsecutiveDelimitersSkipped) {
- std::vector<std::string> results;
- SplitStringUsingSubstr(
- "unoDELIMITERDELIMITERDELIMITERdosDELIMITERtresDELIMITERDELIMITERcuatro",
- "DELIMITER",
- &results);
- ASSERT_EQ(7u, results.size());
- EXPECT_THAT(results, ElementsAre("uno", "", "", "dos", "tres", "", "cuatro"));
-}
-
-TEST(SplitStringUsingSubstrTest, TrailingDelimitersSkipped) {
- std::vector<std::string> results;
- SplitStringUsingSubstr(
- "unDELIMITERdeuxDELIMITERtroisDELIMITERquatreDELIMITERDELIMITERDELIMITER",
- "DELIMITER",
- &results);
- ASSERT_EQ(7u, results.size());
- EXPECT_THAT(
- results, ElementsAre("un", "deux", "trois", "quatre", "", "", ""));
-}
-
-} // namespace base
+} // base