| Index: content/browser/web_contents/web_contents_impl_unittest.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
|
| index 67e8e40b631a654f40b8d438f0b698d6bc1f2042..f8e1e38543a5032fc7541112f564cbb88af9c666 100644
|
| --- a/content/browser/web_contents/web_contents_impl_unittest.cc
|
| +++ b/content/browser/web_contents/web_contents_impl_unittest.cc
|
| @@ -3062,50 +3062,4 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
|
| EXPECT_FALSE(contents()->has_audio_power_save_blocker_for_testing());
|
| }
|
|
|
| -// Test that sudden termination status is properly tracked for a frame.
|
| -TEST_F(WebContentsImplTest, SuddenTerminationForFrame) {
|
| - const GURL url("http://www.chromium.org");
|
| - contents()->NavigateAndCommit(url);
|
| -
|
| - TestRenderFrameHost* frame = contents()->GetMainFrame();
|
| - EXPECT_TRUE(frame->SuddenTerminationAllowed());
|
| -
|
| - // Register a BeforeUnload handler.
|
| - frame->SendBeforeUnloadHandlersPresent(true);
|
| - EXPECT_FALSE(frame->SuddenTerminationAllowed());
|
| -
|
| - // Unregister the BeforeUnload handler.
|
| - frame->SendBeforeUnloadHandlersPresent(false);
|
| - EXPECT_TRUE(frame->SuddenTerminationAllowed());
|
| -
|
| - // Register an Unload handler.
|
| - frame->SendUnloadHandlersPresent(true);
|
| - EXPECT_FALSE(frame->SuddenTerminationAllowed());
|
| -
|
| - // Unregister the Unload handler.
|
| - frame->SendUnloadHandlersPresent(false);
|
| - EXPECT_TRUE(frame->SuddenTerminationAllowed());
|
| -
|
| - // Register a BeforeUnload handler and an Unload handler.
|
| - frame->SendBeforeUnloadHandlersPresent(true);
|
| - frame->SendUnloadHandlersPresent(true);
|
| - EXPECT_FALSE(frame->SuddenTerminationAllowed());
|
| -
|
| - // Override the sudden termination status.
|
| - frame->set_override_sudden_termination_status(true);
|
| - EXPECT_TRUE(frame->SuddenTerminationAllowed());
|
| - frame->set_override_sudden_termination_status(false);
|
| - EXPECT_FALSE(frame->SuddenTerminationAllowed());
|
| -
|
| - // Sudden termination should not be allowed unless there are no BeforeUnload
|
| - // handlers and no Unload handlers in the RenderFrame.
|
| - frame->SendBeforeUnloadHandlersPresent(false);
|
| - EXPECT_FALSE(frame->SuddenTerminationAllowed());
|
| - frame->SendBeforeUnloadHandlersPresent(true);
|
| - frame->SendUnloadHandlersPresent(false);
|
| - EXPECT_FALSE(frame->SuddenTerminationAllowed());
|
| - frame->SendBeforeUnloadHandlersPresent(false);
|
| - EXPECT_TRUE(frame->SuddenTerminationAllowed());
|
| -}
|
| -
|
| } // namespace content
|
|
|