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

Unified Diff: chrome/test/automated_ui_tests/automated_ui_tests.cc

Issue 18248: CommandLine API rework (Closed)
Patch Set: fixes Created 11 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/renderer_main.cc ('k') | chrome/test/automation/automation_proxy_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automated_ui_tests/automated_ui_tests.cc
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc
index dcbac5b31725ab279199e3f7e6e9342dc1196335..81d0f0b2ad7ed597debbd5f6f98f3837638c76a8 100644
--- a/chrome/test/automated_ui_tests/automated_ui_tests.cc
+++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc
@@ -79,7 +79,7 @@ AutomatedUITest::AutomatedUITest()
post_action_delay_(0) {
show_window_ = true;
GetSystemTimeAsFileTime(&test_start_time_);
- CommandLine parsed_command_line;
+ const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
if (parsed_command_line.HasSwitch(kDebugModeSwitch))
debug_logging_enabled_ = true;
if (parsed_command_line.HasSwitch(kWaitSwitch)) {
@@ -95,7 +95,7 @@ AutomatedUITest::AutomatedUITest()
AutomatedUITest::~AutomatedUITest() {}
void AutomatedUITest::RunReproduction() {
- CommandLine parsed_command_line;
+ const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
xml_writer_.StartWriting();
xml_writer_.StartElement("Report");
std::string action_string =
@@ -863,7 +863,7 @@ bool AutomatedUITest::SimulateKeyPressInActiveWindow(wchar_t key, int flags) {
bool AutomatedUITest::InitXMLReader() {
std::wstring input_path;
- CommandLine parsed_command_line;
+ const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
if (parsed_command_line.HasSwitch(kInputFilePathSwitch))
input_path = parsed_command_line.GetSwitchValue(kInputFilePathSwitch);
else
@@ -877,7 +877,7 @@ bool AutomatedUITest::InitXMLReader() {
bool AutomatedUITest::WriteReportToFile() {
std::ofstream error_file;
std::wstring path;
- CommandLine parsed_command_line;
+ const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
if (parsed_command_line.HasSwitch(kOutputFilePathSwitch))
path = parsed_command_line.GetSwitchValue(kOutputFilePathSwitch);
else
@@ -897,7 +897,7 @@ bool AutomatedUITest::WriteReportToFile() {
void AutomatedUITest::AppendToOutputFile(const std::string &append_string) {
std::ofstream error_file;
std::wstring path;
- CommandLine parsed_command_line;
+ const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
if (parsed_command_line.HasSwitch(kOutputFilePathSwitch))
path = parsed_command_line.GetSwitchValue(kOutputFilePathSwitch);
else
@@ -1001,7 +1001,7 @@ bool AutomatedUITest::DidCrash(bool update_total_crashes) {
}
TEST_F(AutomatedUITest, TheOneAndOnlyTest) {
- CommandLine parsed_command_line;
+ const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
if (parsed_command_line.HasSwitch(kReproSwitch))
RunReproduction();
else
« no previous file with comments | « chrome/renderer/renderer_main.cc ('k') | chrome/test/automation/automation_proxy_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698