Commit f13b575d authored by jochen@chromium.org's avatar jochen@chromium.org

Report devtools frontend crashes during layout tests

BUG=383089
R=dpranke@chromium.org

Review URL: https://codereview.chromium.org/335673002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276797 0039d316-1c4b-4281-b951-d872f2087c98
parent 07983697
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "content/shell/browser/shell_browser_main_parts.h" #include "content/shell/browser/shell_browser_main_parts.h"
#include "content/shell/browser/shell_content_browser_client.h" #include "content/shell/browser/shell_content_browser_client.h"
#include "content/shell/browser/shell_devtools_delegate.h" #include "content/shell/browser/shell_devtools_delegate.h"
#include "content/shell/browser/webkit_test_controller.h"
#include "content/shell/common/shell_switches.h" #include "content/shell/common/shell_switches.h"
#include "net/base/filename_util.h" #include "net/base/filename_util.h"
...@@ -131,6 +132,11 @@ void ShellDevToolsFrontend::WebContentsDestroyed() { ...@@ -131,6 +132,11 @@ void ShellDevToolsFrontend::WebContentsDestroyed() {
delete this; delete this;
} }
void ShellDevToolsFrontend::RenderProcessGone(base::TerminationStatus status) {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
WebKitTestController::Get()->DevToolsProcessCrashed();
}
void ShellDevToolsFrontend::InspectedContentsClosing() { void ShellDevToolsFrontend::InspectedContentsClosing() {
frontend_shell_->Close(); frontend_shell_->Close();
} }
......
...@@ -45,6 +45,7 @@ class ShellDevToolsFrontend : public WebContentsObserver, ...@@ -45,6 +45,7 @@ class ShellDevToolsFrontend : public WebContentsObserver,
virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
virtual void DocumentOnLoadCompletedInMainFrame() OVERRIDE; virtual void DocumentOnLoadCompletedInMainFrame() OVERRIDE;
virtual void WebContentsDestroyed() OVERRIDE; virtual void WebContentsDestroyed() OVERRIDE;
virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
// DevToolsFrontendHostDelegate implementation // DevToolsFrontendHostDelegate implementation
virtual void DispatchOnEmbedder(const std::string& message) OVERRIDE {} virtual void DispatchOnEmbedder(const std::string& message) OVERRIDE {}
......
...@@ -421,6 +421,12 @@ void WebKitTestController::RenderProcessGone(base::TerminationStatus status) { ...@@ -421,6 +421,12 @@ void WebKitTestController::RenderProcessGone(base::TerminationStatus status) {
DiscardMainWindow(); DiscardMainWindow();
} }
void WebKitTestController::DevToolsProcessCrashed() {
DCHECK(CalledOnValidThread());
printer_->AddErrorMessage("#CRASHED - devtools");
DiscardMainWindow();
}
void WebKitTestController::WebContentsDestroyed() { void WebKitTestController::WebContentsDestroyed() {
DCHECK(CalledOnValidThread()); DCHECK(CalledOnValidThread());
printer_->AddErrorMessage("FAIL: main window was destroyed"); printer_->AddErrorMessage("FAIL: main window was destroyed");
......
...@@ -129,6 +129,8 @@ class WebKitTestController : public base::NonThreadSafe, ...@@ -129,6 +129,8 @@ class WebKitTestController : public base::NonThreadSafe,
printer_.reset(printer); printer_.reset(printer);
} }
void DevToolsProcessCrashed();
// WebContentsObserver implementation. // WebContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void PluginCrashed(const base::FilePath& plugin_path, virtual void PluginCrashed(const base::FilePath& plugin_path,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment