From 61bd923ba27ea3df507e2d9276bb05dbc1bf9f88 Mon Sep 17 00:00:00 2001 From: "jrg@chromium.org" Date: Fri, 6 Mar 2009 21:45:35 +0000 Subject: New switch --gdb allows TestShell.app to be debugged by gdb even when using --layout-tests, where we otherwise try hard to not talk to CrashReporter (and also breaks gdb). Review URL: http://codereview.chromium.org/39270 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11162 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/tools/test_shell/test_shell_main.cc | 9 ++++++--- webkit/tools/test_shell/test_shell_switches.cc | 4 ++++ webkit/tools/test_shell/test_shell_switches.h | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'webkit/tools') diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index fee33cf..dcf2557 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -93,10 +93,13 @@ int main(int argc, char* argv[]) { // Initialize WebKit for this scope. TestShellWebKitInit test_shell_webkit_init(layout_test_mode); - // Suppress abort message in v8 library in debugging mode. - // V8 calls abort() when it hits assertion errors. - if (suppress_error_dialogs) + // Suppress abort message in v8 library in debugging mode (but not + // actually under a debugger). V8 calls abort() when it hits + // assertion errors. + if (suppress_error_dialogs && + !parsed_command_line.HasSwitch(test_shell::kGDB)) { platform.SuppressErrorReporting(); + } if (parsed_command_line.HasSwitch(test_shell::kEnableTracing)) base::TraceLog::StartTracing(); diff --git a/webkit/tools/test_shell/test_shell_switches.cc b/webkit/tools/test_shell/test_shell_switches.cc index bf66faf..b271f18 100644 --- a/webkit/tools/test_shell/test_shell_switches.cc +++ b/webkit/tools/test_shell/test_shell_switches.cc @@ -67,5 +67,9 @@ extern const wchar_t kCheckLayoutTestSystemDeps[] = // Enable the media player by having this switch. extern const wchar_t kEnableVideo[] = L"enable-video"; +// If set, we are running under GDB so allow a certain class of errors +// to happen even if in layout test mode. +extern const wchar_t kGDB[] = L"gdb"; + } // namespace test_shell diff --git a/webkit/tools/test_shell/test_shell_switches.h b/webkit/tools/test_shell/test_shell_switches.h index ce10d3f..c6c52c2 100644 --- a/webkit/tools/test_shell/test_shell_switches.h +++ b/webkit/tools/test_shell/test_shell_switches.h @@ -29,6 +29,7 @@ extern const wchar_t kEnableTracing[]; extern const wchar_t kAllowScriptsToCloseWindows[]; extern const wchar_t kCheckLayoutTestSystemDeps[]; extern const wchar_t kEnableVideo[]; +extern const wchar_t kGDB[]; } // namespace test_shell -- cgit v1.1