From 9638a0712a9a1f7fe7404f0f6b1bb6d6c0cfa13a Mon Sep 17 00:00:00 2001 From: "maruel@google.com" Date: Thu, 21 Aug 2008 19:22:24 +0000 Subject: Add the ability to disable breakpad while running the ui tests. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1169 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/ui/ui_test.cc | 3 +++ chrome/test/ui/ui_test.h | 7 +++++++ chrome/test/ui/ui_test_suite.h | 2 ++ 3 files changed, 12 insertions(+) (limited to 'chrome/test') diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 7160f15..af4f027 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -63,6 +63,7 @@ bool UITest::default_use_existing_browser_ = false; bool UITest::dump_histograms_on_exit_ = false; bool UITest::enable_dcheck_ = false; bool UITest::silent_dump_on_dcheck_ = false; +bool UITest::disable_breakpad_ = false; int UITest::timeout_ms_ = 20 * 60 * 1000; // Uncomment this line to have the spawned process wait for the debugger to @@ -207,6 +208,8 @@ void UITest::LaunchBrowser(const std::wstring& arguments, bool clear_profile) { CommandLine::AppendSwitch(&command_line, switches::kEnableDCHECK); if (silent_dump_on_dcheck_) CommandLine::AppendSwitch(&command_line, switches::kSilentDumpOnDCHECK); + if (disable_breakpad_) + CommandLine::AppendSwitch(&command_line, switches::kDisableBreakpad); if (!homepage_.empty()) CommandLine::AppendSwitchWithValue(&command_line, switches::kHomePage, diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h index cd9ede9..5e54c28 100644 --- a/chrome/test/ui/ui_test.h +++ b/chrome/test/ui/ui_test.h @@ -216,6 +216,12 @@ class UITest : public testing::Test { silent_dump_on_dcheck_ = value; } + // Get/Set a flag to disable breakpad handling. + static bool disable_breakpad() { return disable_breakpad_; } + static void set_disable_breakpad(bool value) { + disable_breakpad_ = value; + } + // Get/Set a flag to run the plugin processes inside the sandbox when running // the tests static bool safe_plugins() { return safe_plugins_; } @@ -345,6 +351,7 @@ class UITest : public testing::Test { static bool enable_dcheck_; // Enable dchecks in release mode. static bool silent_dump_on_dcheck_; // Dump process memory on dcheck without // crashing. + static bool disable_breakpad_; // Disable breakpad on the browser. static int timeout_ms_; // Timeout in milliseconds to wait // for an test to finish. ::scoped_ptr server_; diff --git a/chrome/test/ui/ui_test_suite.h b/chrome/test/ui/ui_test_suite.h index 7631def..614dd43 100644 --- a/chrome/test/ui/ui_test_suite.h +++ b/chrome/test/ui/ui_test_suite.h @@ -61,6 +61,8 @@ class UITestSuite : public ChromeTestSuite { parsed_command_line_.HasSwitch(switches::kEnableDCHECK)); UITest::set_silent_dump_on_dcheck( parsed_command_line_.HasSwitch(switches::kSilentDumpOnDCHECK)); + UITest::set_disable_breakpad( + parsed_command_line_.HasSwitch(switches::kDisableBreakpad)); std::wstring test_timeout = parsed_command_line_.GetSwitchValue(UITestSuite::kTestTimeout); if (!test_timeout.empty()) { -- cgit v1.1