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

Side by Side Diff: net/ftp/ftp_directory_listing_parser_vms_unittest.cc

Issue 3750001: base: Move SplitString functions into the base namespace and update the callers. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: brett review, reverted changes in o3d due to it's using an old base revision Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "net/ftp/ftp_directory_listing_parser_unittest.h" 5 #include "net/ftp/ftp_directory_listing_parser_unittest.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/string_split.h" 8 #include "base/string_split.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 "Directory ROOT|X.TXT;2 1 12-MAR-2005 08:44:57 [X] (RWED,RWED,RE,RE,RE)", 99 "Directory ROOT|X.TXT;2 1 12-MAR-2005 08:44:57 [X] (RWED,RWED,RE,RE,RE)",
100 "Directory ROOT|X.TXT;2 1 12-MAR-2005 08:44:57 [X] (RWED,RWEDRWED,RE,RE)", 100 "Directory ROOT|X.TXT;2 1 12-MAR-2005 08:44:57 [X] (RWED,RWEDRWED,RE,RE)",
101 "Directory ROOT|X.TXT;2 1 12-MAR-2005 08:44:57 [X] (RWED,DEWR,RE,RE)", 101 "Directory ROOT|X.TXT;2 1 12-MAR-2005 08:44:57 [X] (RWED,DEWR,RE,RE)",
102 "Directory ROOT|X.TXT;2 1 12-MAR-2005 08:44:57 [X] (RWED,RWED,Q,RE)", 102 "Directory ROOT|X.TXT;2 1 12-MAR-2005 08:44:57 [X] (RWED,RWED,Q,RE)",
103 "Directory ROOT|X.TXT;2 1 12-MAR-2005 08:44:57 [X] (RWED,RRWWEEDD,RE,RE)", 103 "Directory ROOT|X.TXT;2 1 12-MAR-2005 08:44:57 [X] (RWED,RRWWEEDD,RE,RE)",
104 }; 104 };
105 for (size_t i = 0; i < arraysize(bad_cases); i++) { 105 for (size_t i = 0; i < arraysize(bad_cases); i++) {
106 SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %s", i, bad_cases[i])); 106 SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %s", i, bad_cases[i]));
107 107
108 std::vector<std::string> lines; 108 std::vector<std::string> lines;
109 SplitString(bad_cases[i], '|', &lines); 109 base::SplitString(bad_cases[i], '|', &lines);
110 net::FtpDirectoryListingParserVms parser; 110 net::FtpDirectoryListingParserVms parser;
111 bool failed = false; 111 bool failed = false;
112 for (std::vector<std::string>::const_iterator i = lines.begin(); 112 for (std::vector<std::string>::const_iterator i = lines.begin();
113 i != lines.end(); ++i) { 113 i != lines.end(); ++i) {
114 if (!parser.ConsumeLine(UTF8ToUTF16(*i))) { 114 if (!parser.ConsumeLine(UTF8ToUTF16(*i))) {
115 failed = true; 115 failed = true;
116 break; 116 break;
117 } 117 }
118 } 118 }
119 EXPECT_TRUE(failed); 119 EXPECT_TRUE(failed);
120 } 120 }
121 } 121 }
122 122
123 } // namespace 123 } // namespace
OLDNEW
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_vms.cc ('k') | net/ftp/ftp_directory_listing_parser_windows.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698