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

Unified Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 498293002: Fix reload of a tab that crashed in background. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months 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/browser/renderer_host/render_widget_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_unittest.cc
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 89e25e27e20eeac78afecd8eb94188d298f0b9db..6503eeabd0cfee7e47da7749a3e2e8401f414ac3 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -1416,4 +1416,18 @@ TEST_F(RenderWidgetHostTest, RendererExitedResetsInputRouter) {
ASSERT_FALSE(host_->input_router()->HasPendingEvents());
}
+// Regression test for http://crbug.com/401859.
+TEST_F(RenderWidgetHostTest, RendererExitedResetsIsHidden) {
+ // RendererExited will delete the view.
+ host_->SetView(new TestView(host_.get()));
+ host_->WasHidden();
+
+ ASSERT_TRUE(host_->is_hidden());
+ host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1);
+ ASSERT_FALSE(host_->is_hidden());
+
+ // Make sure the input router is in a fresh state.
+ ASSERT_FALSE(host_->input_router()->HasPendingEvents());
+}
+
} // namespace content
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698