diff options
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/automated_ui_tests/automated_ui_tests.cc | 7 | ||||
-rw-r--r-- | chrome/test/tab_switching/tab_switching_test.cc | 6 | ||||
-rw-r--r-- | chrome/test/ui/ui_test_suite.cc | 9 |
3 files changed, 13 insertions, 9 deletions
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc index fed3dba..85992bd 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.cc +++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -7,13 +7,13 @@ #include <vector> #include "base/command_line.h" +#include "base/env_var.h" #include "base/file_util.h" #include "base/keyboard_codes.h" #include "base/logging.h" #include "base/path_service.h" #include "base/rand_util.h" #include "base/string_util.h" -#include "base/sys_info.h" #include "base/time.h" #include "chrome/app/chrome_dll_resource.h" #include "chrome/browser/browser_process.h" @@ -130,7 +130,8 @@ AutomatedUITest::AutomatedUITest() post_action_delay_ = StringToInt(str); } } - if (base::SysInfo::HasEnvVar(env_vars::kHeadless)) + scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create()); + if (env->HasEnv(env_vars::kHeadless)) logging::SetLogReportHandler(SilentRuntimeReportHandler); } diff --git a/chrome/test/tab_switching/tab_switching_test.cc b/chrome/test/tab_switching/tab_switching_test.cc index 74c6f25..4f74c6e 100644 --- a/chrome/test/tab_switching/tab_switching_test.cc +++ b/chrome/test/tab_switching/tab_switching_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -44,10 +44,10 @@ class TabSwitchingUITest : public UITest { // Set the log file path for the browser test. #if defined(OS_WIN) - SetEnvironmentVariable(env_vars::kLogFileName, + SetEnvironmentVariable(UTF8ToWide(env_vars::kLogFileName).c_str(), log_file_name_.value().c_str()); #else - setenv(WideToASCII(env_vars::kLogFileName).c_str(), + setenv(env_vars::kLogFileName, log_file_name_.value().c_str(), 1); #endif diff --git a/chrome/test/ui/ui_test_suite.cc b/chrome/test/ui/ui_test_suite.cc index bbdf428b..7f1850c 100644 --- a/chrome/test/ui/ui_test_suite.cc +++ b/chrome/test/ui/ui_test_suite.cc @@ -1,12 +1,14 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/test/ui/ui_test_suite.h" +#include <string> + +#include "base/env_var.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/sys_info.h" #include "chrome/common/env_vars.h" // Force a test to use an already running browser instance. UI tests only. @@ -116,7 +118,8 @@ void UITestSuite::SuppressErrorDialogs() { #if defined(OS_WIN) void UITestSuite::LoadCrashService() { - if (base::SysInfo::HasEnvVar(env_vars::kHeadless)) + scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create()); + if (env->HasEnv(env_vars::kHeadless)) return; if (base::GetProcessCount(L"crash_service.exe", NULL)) |