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

Side by Side Diff: chrome/test/selenium/selenium_test.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/chrome_process_util_mac.cc ('k') | chrome/test/startup/startup_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 // This is a gTest-based test that runs the Selenium Core testsuite in Chrome 5 // This is a gTest-based test that runs the Selenium Core testsuite in Chrome
6 // using the UITest automation. The number of total and failed tests are 6 // using the UITest automation. The number of total and failed tests are
7 // written to stdout. 7 // written to stdout.
8 // 8 //
9 // TODO(darin): output the names of the failed tests so we can easily track 9 // TODO(darin): output the names of the failed tests so we can easily track
10 // deviations from the expected output. 10 // deviations from the expected output.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 typedef std::list<std::string> ResultsList; 46 typedef std::list<std::string> ResultsList;
47 typedef std::set<std::string> ResultsSet; 47 typedef std::set<std::string> ResultsSet;
48 48
49 // Parses a selenium results string, which is of the form: 49 // Parses a selenium results string, which is of the form:
50 // "5.selectFrame,6.click,24.selectAndWait,24.verifyTitle" 50 // "5.selectFrame,6.click,24.selectAndWait,24.verifyTitle"
51 void ParseResults(const std::string& input, ResultsSet* output) { 51 void ParseResults(const std::string& input, ResultsSet* output) {
52 if (input.empty()) 52 if (input.empty())
53 return; 53 return;
54 54
55 std::vector<std::string> tokens; 55 std::vector<std::string> tokens;
56 SplitString(input, ',', &tokens); 56 base::SplitString(input, ',', &tokens);
57 for (size_t i = 0; i < tokens.size(); ++i) { 57 for (size_t i = 0; i < tokens.size(); ++i) {
58 TrimWhitespaceASCII(tokens[i], TRIM_ALL, &tokens[i]); 58 TrimWhitespaceASCII(tokens[i], TRIM_ALL, &tokens[i]);
59 output->insert(tokens[i]); 59 output->insert(tokens[i]);
60 } 60 }
61 } 61 }
62 62
63 // Find the elements of "b" that are not in "a" 63 // Find the elements of "b" that are not in "a"
64 void CompareSets(const ResultsSet& a, const ResultsSet& b, 64 void CompareSets(const ResultsSet& a, const ResultsSet& b,
65 ResultsList* only_in_b) { 65 ResultsList* only_in_b) {
66 ResultsSet::const_iterator it = b.begin(); 66 ResultsSet::const_iterator it = b.begin();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 169
170 if (!new_passes_list.empty()) { 170 if (!new_passes_list.empty()) {
171 printf("new tests passing:\n"); 171 printf("new tests passing:\n");
172 ResultsList::const_iterator it = new_passes_list.begin(); 172 ResultsList::const_iterator it = new_passes_list.begin();
173 for (; it != new_passes_list.end(); ++it) 173 for (; it != new_passes_list.end(); ++it)
174 printf(" %s\n", it->c_str()); 174 printf(" %s\n", it->c_str());
175 printf("\n"); 175 printf("\n");
176 } 176 }
177 } 177 }
OLDNEW
« no previous file with comments | « chrome/test/chrome_process_util_mac.cc ('k') | chrome/test/startup/startup_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698