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

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

Issue 1308623003: Assume crashed RenderWidgetHost to be invisible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check dest_render_frame_host->render_view_host()->is_hidden() Created 5 years, 3 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 f68bb2ecd53fdc86c43a75fd35df49571bce9748..3cd868ae20351596bc62fac007ed9a3e1a5c898d 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -1505,15 +1505,15 @@ TEST_F(RenderWidgetHostTest, RendererExitedResetsInputRouter) {
ASSERT_FALSE(host_->input_router()->HasPendingEvents());
}
-// Regression test for http://crbug.com/401859.
+// Regression test for http://crbug.com/401859 and http://crbug.com/522795.
TEST_F(RenderWidgetHostTest, RendererExitedResetsIsHidden) {
// RendererExited will delete the view.
host_->SetView(new TestView(host_.get()));
- host_->WasHidden();
+ host_->WasShown(ui::LatencyInfo());
- ASSERT_TRUE(host_->is_hidden());
- host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1);
ASSERT_FALSE(host_->is_hidden());
+ host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1);
+ ASSERT_TRUE(host_->is_hidden());
// Make sure the input router is in a fresh state.
ASSERT_FALSE(host_->input_router()->HasPendingEvents());
« 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