Commit 7d46b886 authored by Lowell Manners's avatar Lowell Manners Committed by Commit Bot

Delete long disabled test: RenderViewImplTest.LastCommittedUpdateState

This test was originally disabled due to flakiness in 2012. Now when
enabled, it fails 100% of the time.

Change-Id: I7b207bcc67fb133e2aebf3670f57202244914c35
Bug: 157357,786836
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1588387
Commit-Queue: Lowell Manners <lowell@chromium.org>
Reviewed-by: default avatarCharlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659424}
parent 78ec89e4
...@@ -1164,110 +1164,6 @@ TEST_F(RenderViewImplEnableZoomForDSFTest, ...@@ -1164,110 +1164,6 @@ TEST_F(RenderViewImplEnableZoomForDSFTest,
EXPECT_TRUE(view()->webview()->MainFrame()->IsWebRemoteFrame()); EXPECT_TRUE(view()->webview()->MainFrame()->IsWebRemoteFrame());
} }
// Test that we get the correct UpdateState message when we go back twice
// quickly without committing. Regression test for http://crbug.com/58082.
// Disabled: http://crbug.com/157357 .
TEST_F(RenderViewImplTest, DISABLED_LastCommittedUpdateState) {
// Load page A.
LoadHTML("<div>Page A</div>");
// Load page B, which will trigger an UpdateState message for page A.
LoadHTML("<div>Page B</div>");
// Check for a valid UpdateState message for page A.
base::RunLoop().RunUntilIdle();
const IPC::Message* msg_A = render_thread_->sink().GetUniqueMessageMatching(
FrameHostMsg_UpdateState::ID);
ASSERT_TRUE(msg_A);
FrameHostMsg_UpdateState::Param param;
FrameHostMsg_UpdateState::Read(msg_A, &param);
PageState state_A = std::get<0>(param);
render_thread_->sink().ClearMessages();
// Load page C, which will trigger an UpdateState message for page B.
LoadHTML("<div>Page C</div>");
// Check for a valid UpdateState for page B.
base::RunLoop().RunUntilIdle();
const IPC::Message* msg_B = render_thread_->sink().GetUniqueMessageMatching(
FrameHostMsg_UpdateState::ID);
ASSERT_TRUE(msg_B);
FrameHostMsg_UpdateState::Read(msg_B, &param);
PageState state_B = std::get<0>(param);
EXPECT_NE(state_A, state_B);
render_thread_->sink().ClearMessages();
// Load page D, which will trigger an UpdateState message for page C.
LoadHTML("<div>Page D</div>");
// Check for a valid UpdateState for page C.
base::RunLoop().RunUntilIdle();
const IPC::Message* msg_C = render_thread_->sink().GetUniqueMessageMatching(
FrameHostMsg_UpdateState::ID);
ASSERT_TRUE(msg_C);
FrameHostMsg_UpdateState::Read(msg_C, &param);
PageState state_C = std::get<0>(param);
EXPECT_NE(state_B, state_C);
render_thread_->sink().ClearMessages();
// Go back to C and commit, preparing for our real test.
CommonNavigationParams common_params_C;
CommitNavigationParams commit_params_C;
common_params_C.navigation_type =
FrameMsg_Navigate_Type::HISTORY_DIFFERENT_DOCUMENT;
common_params_C.transition = ui::PAGE_TRANSITION_FORWARD_BACK;
commit_params_C.current_history_list_length = 4;
commit_params_C.current_history_list_offset = 3;
commit_params_C.pending_history_list_offset = 2;
commit_params_C.nav_entry_id = 3;
commit_params_C.page_state = state_C;
frame()->Navigate(common_params_C, commit_params_C);
base::RunLoop().RunUntilIdle();
render_thread_->sink().ClearMessages();
// Go back twice quickly, such that page B does not have a chance to commit.
// This leads to two changes to the back/forward list but only one change to
// the RenderView's page ID.
// Back to page B without committing.
CommonNavigationParams common_params_B;
CommitNavigationParams commit_params_B;
common_params_B.navigation_type =
FrameMsg_Navigate_Type::HISTORY_DIFFERENT_DOCUMENT;
common_params_B.transition = ui::PAGE_TRANSITION_FORWARD_BACK;
commit_params_B.current_history_list_length = 4;
commit_params_B.current_history_list_offset = 2;
commit_params_B.pending_history_list_offset = 1;
commit_params_B.nav_entry_id = 2;
commit_params_B.page_state = state_B;
frame()->Navigate(common_params_B, commit_params_B);
// Back to page A and commit.
CommonNavigationParams common_params;
CommitNavigationParams commit_params;
common_params.navigation_type =
FrameMsg_Navigate_Type::HISTORY_DIFFERENT_DOCUMENT;
common_params.transition = ui::PAGE_TRANSITION_FORWARD_BACK;
commit_params.current_history_list_length = 4;
commit_params.current_history_list_offset = 2;
commit_params.pending_history_list_offset = 0;
commit_params.nav_entry_id = 1;
commit_params.page_state = state_A;
frame()->Navigate(common_params, commit_params);
base::RunLoop().RunUntilIdle();
// Now ensure that the UpdateState message we receive is consistent
// and represents page C in state.
const IPC::Message* msg = render_thread_->sink().GetUniqueMessageMatching(
FrameHostMsg_UpdateState::ID);
ASSERT_TRUE(msg);
FrameHostMsg_UpdateState::Read(msg, &param);
PageState state = std::get<0>(param);
EXPECT_NE(state_A, state);
EXPECT_NE(state_B, state);
EXPECT_EQ(state_C, state);
}
// Test that our IME backend sends a notification message when the input focus // Test that our IME backend sends a notification message when the input focus
// changes. // changes.
TEST_F(RenderViewImplTest, OnImeTypeChanged) { TEST_F(RenderViewImplTest, OnImeTypeChanged) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment