| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "content/browser/frame_host/cross_site_transferring_request.h" | 8 #include "content/browser/frame_host/cross_site_transferring_request.h" |
| 9 #include "content/browser/frame_host/interstitial_page_impl.h" | 9 #include "content/browser/frame_host/interstitial_page_impl.h" |
| 10 #include "content/browser/frame_host/navigation_entry_impl.h" | 10 #include "content/browser/frame_host/navigation_entry_impl.h" |
| (...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 } | 1430 } |
| 1431 | 1431 |
| 1432 contents()->SetDelegate(nullptr); | 1432 contents()->SetDelegate(nullptr); |
| 1433 } | 1433 } |
| 1434 | 1434 |
| 1435 TEST_F(WebContentsImplTest, TerminateHidesValidationMessage) { | 1435 TEST_F(WebContentsImplTest, TerminateHidesValidationMessage) { |
| 1436 FakeValidationMessageDelegate fake_delegate; | 1436 FakeValidationMessageDelegate fake_delegate; |
| 1437 contents()->SetDelegate(&fake_delegate); | 1437 contents()->SetDelegate(&fake_delegate); |
| 1438 EXPECT_FALSE(fake_delegate.hide_validation_message_was_called()); | 1438 EXPECT_FALSE(fake_delegate.hide_validation_message_was_called()); |
| 1439 | 1439 |
| 1440 // Crash the renderer. | 1440 // Initialize the RenderFrame and then simulate crashing the renderer |
| 1441 // process. |
| 1442 contents()->GetMainFrame()->InitializeRenderFrameIfNeeded(); |
| 1441 contents()->GetMainFrame()->GetProcess()->SimulateCrash(); | 1443 contents()->GetMainFrame()->GetProcess()->SimulateCrash(); |
| 1442 | 1444 |
| 1443 // Confirm HideValidationMessage was called. | 1445 // Confirm HideValidationMessage was called. |
| 1444 EXPECT_TRUE(fake_delegate.hide_validation_message_was_called()); | 1446 EXPECT_TRUE(fake_delegate.hide_validation_message_was_called()); |
| 1445 | 1447 |
| 1446 contents()->SetDelegate(nullptr); | 1448 contents()->SetDelegate(nullptr); |
| 1447 } | 1449 } |
| 1448 | 1450 |
| 1449 // Tests that fullscreen is exited throughout the object hierarchy on a renderer | 1451 // Tests that fullscreen is exited throughout the object hierarchy on a renderer |
| 1450 // crash. | 1452 // crash. |
| (...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3114 | 3116 |
| 3115 // Crash the renderer. | 3117 // Crash the renderer. |
| 3116 contents()->GetMainFrame()->GetProcess()->SimulateCrash(); | 3118 contents()->GetMainFrame()->GetProcess()->SimulateCrash(); |
| 3117 | 3119 |
| 3118 // Verify that all the power save blockers have been released. | 3120 // Verify that all the power save blockers have been released. |
| 3119 EXPECT_FALSE(contents()->has_video_power_save_blocker_for_testing()); | 3121 EXPECT_FALSE(contents()->has_video_power_save_blocker_for_testing()); |
| 3120 EXPECT_FALSE(contents()->has_audio_power_save_blocker_for_testing()); | 3122 EXPECT_FALSE(contents()->has_audio_power_save_blocker_for_testing()); |
| 3121 } | 3123 } |
| 3122 | 3124 |
| 3123 } // namespace content | 3125 } // namespace content |
| OLD | NEW |