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

Side by Side Diff: chrome/test/ui/dom_checker_uitest.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
« no previous file with comments | « chrome/test/startup/startup_test.cc ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 FilePath results_path = GetDomCheckerDir(); 113 FilePath results_path = GetDomCheckerDir();
114 results_path = results_path.AppendASCII(failures_file); 114 results_path = results_path.AppendASCII(failures_file);
115 return file_util::ReadFileToString(results_path, results); 115 return file_util::ReadFileToString(results_path, results);
116 } 116 }
117 117
118 void ParseExpectedFailures(const std::string& input, ResultsSet* output) { 118 void ParseExpectedFailures(const std::string& input, ResultsSet* output) {
119 if (input.empty()) 119 if (input.empty())
120 return; 120 return;
121 121
122 std::vector<std::string> tokens; 122 std::vector<std::string> tokens;
123 SplitString(input, '\n', &tokens); 123 base::SplitString(input, '\n', &tokens);
124 124
125 std::vector<std::string>::const_iterator it = tokens.begin(); 125 std::vector<std::string>::const_iterator it = tokens.begin();
126 for (; it != tokens.end(); ++it) { 126 for (; it != tokens.end(); ++it) {
127 // Allow comments (lines that start with #). 127 // Allow comments (lines that start with #).
128 if (it->length() > 0 && it->at(0) != '#') 128 if (it->length() > 0 && it->at(0) != '#')
129 output->insert(*it); 129 output->insert(*it);
130 } 130 }
131 } 131 }
132 132
133 bool GetExpectedFailures(const std::string& failures_file, 133 bool GetExpectedFailures(const std::string& failures_file,
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 TEST_F(DomCheckerTest, FAILS_Http) { 244 TEST_F(DomCheckerTest, FAILS_Http) {
245 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDomCheckerTest)) 245 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDomCheckerTest))
246 return; 246 return;
247 247
248 ResultsList new_passes, new_failures; 248 ResultsList new_passes, new_failures;
249 RunTest(true, &new_passes, &new_failures); 249 RunTest(true, &new_passes, &new_failures);
250 PrintResults(new_passes, new_failures); 250 PrintResults(new_passes, new_failures);
251 } 251 }
252 252
253 } // namespace 253 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/startup/startup_test.cc ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698