| 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
|
|
|