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

Side by Side Diff: chrome/test/automated_ui_tests/automated_ui_tests.cc

Issue 3052034: base: Rename EnvVarGetter to Environment. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: review Created 10 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
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 "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/env_var.h" 10 #include "base/environment.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/keyboard_codes.h" 12 #include "base/keyboard_codes.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/path_service.h" 14 #include "base/path_service.h"
15 #include "base/rand_util.h" 15 #include "base/rand_util.h"
16 #include "base/string_number_conversions.h" 16 #include "base/string_number_conversions.h"
17 #include "base/string_util.h" 17 #include "base/string_util.h"
18 #include "base/time.h" 18 #include "base/time.h"
19 #include "chrome/app/chrome_dll_resource.h" 19 #include "chrome/app/chrome_dll_resource.h"
20 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 if (parsed_command_line.HasSwitch(kDebugModeSwitch)) 124 if (parsed_command_line.HasSwitch(kDebugModeSwitch))
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::EnvVarGetter> env(base::EnvVarGetter::Create()); 134 scoped_ptr<base::Environment> env(base::Environment::Create());
135 if (env->HasEnv(env_vars::kHeadless)) 135 if (env->HasEnv(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");
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698