| OLD | NEW |
| 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 "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 debug_logging_enabled_ = true; | 125 debug_logging_enabled_ = true; |
| 126 if (parsed_command_line.HasSwitch(kWaitSwitch)) { | 126 if (parsed_command_line.HasSwitch(kWaitSwitch)) { |
| 127 std::string str = parsed_command_line.GetSwitchValueASCII(kWaitSwitch); | 127 std::string str = parsed_command_line.GetSwitchValueASCII(kWaitSwitch); |
| 128 if (str.empty()) { | 128 if (str.empty()) { |
| 129 post_action_delay_ = 1; | 129 post_action_delay_ = 1; |
| 130 } else { | 130 } else { |
| 131 base::StringToInt(str, &post_action_delay_); | 131 base::StringToInt(str, &post_action_delay_); |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 scoped_ptr<base::Environment> env(base::Environment::Create()); | 134 scoped_ptr<base::Environment> env(base::Environment::Create()); |
| 135 if (env->HasEnv(env_vars::kHeadless)) | 135 if (env->HasVar(env_vars::kHeadless)) |
| 136 logging::SetLogReportHandler(SilentRuntimeReportHandler); | 136 logging::SetLogReportHandler(SilentRuntimeReportHandler); |
| 137 } | 137 } |
| 138 | 138 |
| 139 AutomatedUITest::~AutomatedUITest() {} | 139 AutomatedUITest::~AutomatedUITest() {} |
| 140 | 140 |
| 141 void AutomatedUITest::RunReproduction() { | 141 void AutomatedUITest::RunReproduction() { |
| 142 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 142 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
| 143 xml_writer_.StartWriting(); | 143 xml_writer_.StartWriting(); |
| 144 xml_writer_.StartElement("Report"); | 144 xml_writer_.StartElement("Report"); |
| 145 std::string action_string = | 145 std::string action_string = |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 } | 748 } |
| 749 } | 749 } |
| 750 | 750 |
| 751 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { | 751 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { |
| 752 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 752 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
| 753 if (parsed_command_line.HasSwitch(kReproSwitch)) | 753 if (parsed_command_line.HasSwitch(kReproSwitch)) |
| 754 RunReproduction(); | 754 RunReproduction(); |
| 755 else | 755 else |
| 756 RunAutomatedUITest(); | 756 RunAutomatedUITest(); |
| 757 } | 757 } |
| OLD | NEW |