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

Side by Side Diff: chrome/test/automated_ui_tests/automated_ui_tests.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/renderer/webplugin_delegate_proxy.cc ('k') | chrome/test/chrome_process_util_mac.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 <fstream> 5 #include <fstream>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "app/keyboard_codes.h" 9 #include "app/keyboard_codes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 std::string action_string = 146 std::string action_string =
147 parsed_command_line.GetSwitchValueASCII(kReproSwitch); 147 parsed_command_line.GetSwitchValueASCII(kReproSwitch);
148 148
149 int64 num_reproductions = 1; 149 int64 num_reproductions = 1;
150 if (parsed_command_line.HasSwitch(kReproRepeatSwitch)) { 150 if (parsed_command_line.HasSwitch(kReproRepeatSwitch)) {
151 base::StringToInt64( 151 base::StringToInt64(
152 parsed_command_line.GetSwitchValueASCII(kReproRepeatSwitch), 152 parsed_command_line.GetSwitchValueASCII(kReproRepeatSwitch),
153 &num_reproductions); 153 &num_reproductions);
154 } 154 }
155 std::vector<std::string> actions; 155 std::vector<std::string> actions;
156 SplitString(action_string, ',', &actions); 156 base::SplitString(action_string, ',', &actions);
157 bool did_crash = false; 157 bool did_crash = false;
158 bool command_complete = false; 158 bool command_complete = false;
159 159
160 for (int64 i = 0; i < num_reproductions && !did_crash; ++i) { 160 for (int64 i = 0; i < num_reproductions && !did_crash; ++i) {
161 bool did_teardown = false; 161 bool did_teardown = false;
162 xml_writer_.StartElement("Executed"); 162 xml_writer_.StartElement("Executed");
163 for (size_t j = 0; j < actions.size(); ++j) { 163 for (size_t j = 0; j < actions.size(); ++j) {
164 DoAction(actions[j]); 164 DoAction(actions[j]);
165 if (DidCrash(true)) { 165 if (DidCrash(true)) {
166 did_crash = true; 166 did_crash = true;
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 } 745 }
746 } 746 }
747 747
748 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { 748 TEST_F(AutomatedUITest, TheOneAndOnlyTest) {
749 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 749 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
750 if (parsed_command_line.HasSwitch(kReproSwitch)) 750 if (parsed_command_line.HasSwitch(kReproSwitch))
751 RunReproduction(); 751 RunReproduction();
752 else 752 else
753 RunAutomatedUITest(); 753 RunAutomatedUITest();
754 } 754 }
OLDNEW
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.cc ('k') | chrome/test/chrome_process_util_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698