OLD | NEW |
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 Loading... |
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 |
OLD | NEW |