Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1724)

Unified Diff: content/shell/webkit_test_runner_host.cc

Issue 11416177: [content shell] change how the main render view is picked for layout tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/webkit_test_runner_host.h ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/webkit_test_runner_host.cc
diff --git a/content/shell/webkit_test_runner_host.cc b/content/shell/webkit_test_runner_host.cc
index e2187f49972defcf608831f7f0a953eca20f68b2..f8e45e57d0b8fb2084b659f437d89fff42ca9b3a 100644
--- a/content/shell/webkit_test_runner_host.cc
+++ b/content/shell/webkit_test_runner_host.cc
@@ -164,7 +164,6 @@ bool WebKitTestController::PrepareForLayoutTest(
NULL,
MSG_ROUTING_NONE,
NULL);
- did_set_as_main_window_ = false;
Observe(main_window_->web_contents());
return true;
}
@@ -181,7 +180,6 @@ bool WebKitTestController::ResetAfterLayoutTest() {
is_printing_ = false;
should_stay_on_page_after_handling_before_unload_ = false;
wait_until_done_ = false;
- did_set_as_main_window_ = false;
watchdog_.Cancel();
if (main_window_) {
Observe(NULL);
@@ -243,21 +241,16 @@ void WebKitTestController::PluginCrashed(const FilePath& plugin_path) {
printer_->AddErrorMessage("#CRASHED - plugin");
}
-void WebKitTestController::RenderViewReady() {
- RenderViewHost* render_view_host =
- main_window_->web_contents()->GetRenderViewHost();
+void WebKitTestController::RenderViewCreated(RenderViewHost* render_view_host) {
render_view_host->Send(new ShellViewMsg_SetCurrentWorkingDirectory(
render_view_host->GetRoutingID(), current_working_directory_));
- if (did_set_as_main_window_)
- return;
- render_view_host->Send(new ShellViewMsg_SetIsMainWindow(
- render_view_host->GetRoutingID()));
- did_set_as_main_window_ = true;
}
void WebKitTestController::RenderViewGone(base::TerminationStatus status) {
- if (status == base::TERMINATION_STATUS_PROCESS_CRASHED)
+ if (status == base::TERMINATION_STATUS_PROCESS_CRASHED ||
+ status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION) {
printer_->AddErrorMessage("#CRASHED - renderer");
+ }
}
void WebKitTestController::WebContentsDestroyed(WebContents* web_contents) {
« no previous file with comments | « content/shell/webkit_test_runner_host.h ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698