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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 1409
1410 TEST_F(RenderWidgetHostTest, RendererExitedResetsInputRouter) { 1410 TEST_F(RenderWidgetHostTest, RendererExitedResetsInputRouter) {
1411 // RendererExited will delete the view. 1411 // RendererExited will delete the view.
1412 host_->SetView(new TestView(host_.get())); 1412 host_->SetView(new TestView(host_.get()));
1413 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1); 1413 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1);
1414 1414
1415 // Make sure the input router is in a fresh state. 1415 // Make sure the input router is in a fresh state.
1416 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); 1416 ASSERT_FALSE(host_->input_router()->HasPendingEvents());
1417 } 1417 }
1418 1418
1419 // Regression test for http://crbug.com/401859.
1420 TEST_F(RenderWidgetHostTest, RendererExitedResetsIsHidden) {
1421 // RendererExited will delete the view.
1422 host_->SetView(new TestView(host_.get()));
1423 host_->WasHidden();
1424
1425 ASSERT_TRUE(host_->is_hidden());
1426 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1);
1427 ASSERT_FALSE(host_->is_hidden());
1428
1429 // Make sure the input router is in a fresh state.
1430 ASSERT_FALSE(host_->input_router()->HasPendingEvents());
1431 }
1432
1419 } // namespace content 1433 } // namespace content
OLDNEW
« 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