summaryrefslogtreecommitdiffstats
path: root/webkit/tools
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 21:45:35 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 21:45:35 +0000
commit61bd923ba27ea3df507e2d9276bb05dbc1bf9f88 (patch)
treefb38fba4e631f3b485e8bd375008111f61ea7021 /webkit/tools
parent2c9bfa5d0f2fdeafc4ac46bf5201e27bdda0c8d3 (diff)
downloadchromium_src-61bd923ba27ea3df507e2d9276bb05dbc1bf9f88.zip
chromium_src-61bd923ba27ea3df507e2d9276bb05dbc1bf9f88.tar.gz
chromium_src-61bd923ba27ea3df507e2d9276bb05dbc1bf9f88.tar.bz2
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
Diffstat (limited to 'webkit/tools')
-rw-r--r--webkit/tools/test_shell/test_shell_main.cc9
-rw-r--r--webkit/tools/test_shell/test_shell_switches.cc4
-rw-r--r--webkit/tools/test_shell/test_shell_switches.h1
3 files changed, 11 insertions, 3 deletions
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