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

Side by Side Diff: chrome/test/selenium/selenium_test.cc

Issue 172039: Replaces some TrimWhitespace with TrimWhitespaceASCII or TrimWhitespaceUTF8. (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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_linux.cc ('k') | chrome/tools/convert_dict/hunspell_reader.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // Parses a selenium results string, which is of the form: 44 // Parses a selenium results string, which is of the form:
45 // "5.selectFrame,6.click,24.selectAndWait,24.verifyTitle" 45 // "5.selectFrame,6.click,24.selectAndWait,24.verifyTitle"
46 void ParseResults(const std::string& input, ResultsSet* output) { 46 void ParseResults(const std::string& input, ResultsSet* output) {
47 if (input.empty()) 47 if (input.empty())
48 return; 48 return;
49 49
50 std::vector<std::string> tokens; 50 std::vector<std::string> tokens;
51 SplitString(input, ',', &tokens); 51 SplitString(input, ',', &tokens);
52 for (size_t i = 0; i < tokens.size(); ++i) { 52 for (size_t i = 0; i < tokens.size(); ++i) {
53 TrimWhitespace(tokens[i], TRIM_ALL, &tokens[i]); 53 TrimWhitespaceASCII(tokens[i], TRIM_ALL, &tokens[i]);
54 output->insert(tokens[i]); 54 output->insert(tokens[i]);
55 } 55 }
56 } 56 }
57 57
58 // Find the elements of "b" that are not in "a" 58 // Find the elements of "b" that are not in "a"
59 void CompareSets(const ResultsSet& a, const ResultsSet& b, 59 void CompareSets(const ResultsSet& a, const ResultsSet& b,
60 ResultsList* only_in_b) { 60 ResultsList* only_in_b) {
61 ResultsSet::const_iterator it = b.begin(); 61 ResultsSet::const_iterator it = b.begin();
62 for (; it != b.end(); ++it) { 62 for (; it != b.end(); ++it) {
63 if (a.find(*it) == a.end()) 63 if (a.find(*it) == a.end())
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 165
166 if (!new_passes_list.empty()) { 166 if (!new_passes_list.empty()) {
167 printf("new tests passing:\n"); 167 printf("new tests passing:\n");
168 ResultsList::const_iterator it = new_passes_list.begin(); 168 ResultsList::const_iterator it = new_passes_list.begin();
169 for (; it != new_passes_list.end(); ++it) 169 for (; it != new_passes_list.end(); ++it)
170 printf(" %s\n", it->c_str()); 170 printf(" %s\n", it->c_str());
171 printf("\n"); 171 printf("\n");
172 } 172 }
173 } 173 }
OLDNEW
« no previous file with comments | « chrome/test/chrome_process_util_linux.cc ('k') | chrome/tools/convert_dict/hunspell_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698