diff options
author | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-18 23:28:35 +0000 |
---|---|---|
committer | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-18 23:28:35 +0000 |
commit | 46a8b615acd3352a28c8fbc14f9fe53d30ff919a (patch) | |
tree | 9e4fb323a3032f893bc5a1678bf0947818647f21 /chrome | |
parent | b32afece494a7439721771224f19f9741eedf181 (diff) | |
download | chromium_src-46a8b615acd3352a28c8fbc14f9fe53d30ff919a.zip chromium_src-46a8b615acd3352a28c8fbc14f9fe53d30ff919a.tar.gz chromium_src-46a8b615acd3352a28c8fbc14f9fe53d30ff919a.tar.bz2 |
Suppress error dialog in automated UI test in
headless mode. This is not done accross UI
tests because automated UI only runs in
ChromeBot.
Review URL: http://codereview.chromium.org/20476
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9990 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/test/automated_ui_tests/automated_ui_tests.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc index 0a4981e..4cab4d5 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.cc +++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc @@ -6,13 +6,16 @@ #include "base/command_line.h" #include "base/file_util.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 "chrome/app/chrome_dll_resource.h" #include "chrome/browser/character_encoding.h" #include "chrome/browser/view_ids.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/env_vars.h" #include "chrome/common/libxml_utils.h" #include "chrome/common/win_util.h" #include "chrome/test/automated_ui_tests/automated_ui_tests.h" @@ -47,6 +50,9 @@ const int kDebuggingTimeoutMsec = 5000; // How many commands to run when testing a dialog box. const int kTestDialogActionsToRun = 7; +void SilentRuntimeReportHandler(const std::string& str) { +} + } // namespace // This subset of commands is used to test dialog boxes, which aren't likely @@ -90,6 +96,8 @@ AutomatedUITest::AutomatedUITest() post_action_delay_ = static_cast<int>(StringToInt64(str)); } } + if (base::SysInfo::HasEnvVar(env_vars::kHeadless)) + logging::SetLogReportHandler(SilentRuntimeReportHandler); } AutomatedUITest::~AutomatedUITest() {} @@ -1007,4 +1015,3 @@ TEST_F(AutomatedUITest, TheOneAndOnlyTest) { else RunAutomatedUITest(); } - |