diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-23 21:51:48 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-23 21:51:48 +0000 |
commit | 292170bc90dc4a80156990a5cf18c2acec4ae547 (patch) | |
tree | 3b2d9d4a98d648295901f871c92f4d878072b08f | |
parent | 67e72977d142088efd7e91a23ef7c22a65e616df (diff) | |
download | chromium_src-292170bc90dc4a80156990a5cf18c2acec4ae547.zip chromium_src-292170bc90dc4a80156990a5cf18c2acec4ae547.tar.gz chromium_src-292170bc90dc4a80156990a5cf18c2acec4ae547.tar.bz2 |
Adds switch to ui tests that enable dialogs in slave process. I'm
adding this to make it easier to attach to a failing ui test.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/18725
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8580 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/test/ui/ui_test.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 597b0af..5d88ba9 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -72,6 +72,10 @@ const wchar_t kUiTestSleepTimeout[] = L"ui-test-sleep-timeout"; const wchar_t kExtraChromeFlagsSwitch[] = L"extra-chrome-flags"; +// By default error dialogs are hidden, which makes debugging failures in the +// slave process frustrating. By passing this in error dialogs are enabled. +const wchar_t kEnableErrorDialogs[] = L"enable-errdialogs"; + // Uncomment this line to have the spawned process wait for the debugger to // attach. // #define WAIT_FOR_DEBUGGER_ON_OPEN 1 @@ -281,8 +285,10 @@ void UITest::LaunchBrowser(const CommandLine& arguments, bool clear_profile) { NOTIMPLEMENTED(); #endif - if (!show_error_dialogs_) + if (!show_error_dialogs_ && + !CommandLine::ForCurrentProcess()->HasSwitch(kEnableErrorDialogs)) { command_line.AppendSwitch(switches::kNoErrorDialogs); + } if (in_process_renderer_) command_line.AppendSwitch(switches::kSingleProcess); if (in_process_plugins_) @@ -312,8 +318,8 @@ void UITest::LaunchBrowser(const CommandLine& arguments, bool clear_profile) { command_line.AppendSwitch(switches::kMetricsRecordingOnly); - // We always want to enable chrome logging - command_line.AppendSwitch(switches::kEnableLogging); + if (!CommandLine::ForCurrentProcess()->HasSwitch(kEnableErrorDialogs)) + command_line.AppendSwitch(switches::kEnableLogging); if (dump_histograms_on_exit_) command_line.AppendSwitch(switches::kDumpHistogramsOnExit); |