summaryrefslogtreecommitdiffstats
path: root/content/renderer/renderer_main.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-17 22:47:38 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-17 22:47:38 +0000
commit194e5975360adeb9d2c91b5a4c2073183582cd46 (patch)
tree36027b03e2d5e1969c3e655792f663fea136f421 /content/renderer/renderer_main.cc
parent33b2bc4019b585933d2e5934aa06e67e18eec58a (diff)
downloadchromium_src-194e5975360adeb9d2c91b5a4c2073183582cd46.zip
chromium_src-194e5975360adeb9d2c91b5a4c2073183582cd46.tar.gz
chromium_src-194e5975360adeb9d2c91b5a4c2073183582cd46.tar.bz2
Convert the logging ui_test to a browser_test.
I spent a lot of time trying to find a way to make the assertion and crash dump locator tests non-flaky and shardable. But it's not really possible, because the log file is per binary, and the dumps all get put into the same directory. That means that running with sharding will give erronous results. Also even if we weren't sharding, there's still race conditions looking at the disk for a crash dump. I kept a test which looks for a notification that we crashed (instead of looking on disk). If this breaks in the field, I believe we'll notice very quickly from the canary builds (do we also have breakpad tests for this?). For the assert/check tests, I think if something breaks there developers will very quickly find it. BUG=121574 Review URL: https://chromiumcodereview.appspot.com/10082001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/renderer_main.cc')
-rw-r--r--content/renderer/renderer_main.cc25
1 files changed, 5 insertions, 20 deletions
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index 24354fe..ae7a8a4 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -110,31 +110,16 @@ class SuicideOnChannelErrorFilter : public IPC::ChannelProxy::MessageFilter {
// This function provides some ways to test crash and assertion handling
// behavior of the renderer.
static void HandleRendererErrorTestParameters(const CommandLine& command_line) {
- // This parameter causes an assertion.
- if (command_line.HasSwitch(switches::kRendererAssertTest)) {
- DCHECK(false);
- }
-
-
-#if !defined(OFFICIAL_BUILD)
- // This parameter causes an assertion too.
- if (command_line.HasSwitch(switches::kRendererCheckFalseTest)) {
- CHECK(false);
- }
-#endif // !defined(OFFICIAL_BUILD)
-
-
- // This parameter causes a null pointer crash (crash reporter trigger).
- if (command_line.HasSwitch(switches::kRendererCrashTest)) {
- int* bad_pointer = NULL;
- *bad_pointer = 0;
- }
-
if (command_line.HasSwitch(switches::kWaitForDebugger))
base::debug::WaitForDebugger(60, true);
if (command_line.HasSwitch(switches::kRendererStartupDialog))
ChildProcess::WaitForDebugger("Renderer");
+
+ // This parameter causes an assertion.
+ if (command_line.HasSwitch(switches::kRendererAssertTest)) {
+ DCHECK(false);
+ }
}
// This is a simplified version of the browser Jankometer, which measures