Commit ae66a37a authored by Fergal Daly's avatar Fergal Daly Committed by Commit Bot

Fix RenderFrameHostManagerTest tests for bfcache.

We just disable bfcache for these tests.

Bug: 1019077
Change-Id: I77245839258af1b842a736d5058fa244813f5d49
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1889830
Commit-Queue: Fergal Daly <fergal@chromium.org>
Reviewed-by: default avatarArthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713315}
parent 16fd4c04
...@@ -1091,6 +1091,10 @@ TEST_F(RenderFrameHostManagerTest, WebUIWasCleared) { ...@@ -1091,6 +1091,10 @@ TEST_F(RenderFrameHostManagerTest, WebUIWasCleared) {
// Ensure that we can go back and forward even if a SwapOut ACK isn't received. // Ensure that we can go back and forward even if a SwapOut ACK isn't received.
// See http://crbug.com/93427. // See http://crbug.com/93427.
TEST_F(RenderFrameHostManagerTest, NavigateAfterMissingSwapOutACK) { TEST_F(RenderFrameHostManagerTest, NavigateAfterMissingSwapOutACK) {
// When a page enters the BackForwardCache, the RenderFrameHost is not
// deleted. Similarly, no SwapOutACK message is sent.
contents()->GetController().GetBackForwardCache().DisableForTesting(
BackForwardCache::TEST_ASSUMES_NO_CACHING);
const GURL kUrl1("http://www.google.com/"); const GURL kUrl1("http://www.google.com/");
const GURL kUrl2 = isolated_cross_site_url(); const GURL kUrl2 = isolated_cross_site_url();
...@@ -1575,6 +1579,10 @@ TEST_F(RenderFrameHostManagerTest, CloseWithPendingWhileUnresponsive) { ...@@ -1575,6 +1579,10 @@ TEST_F(RenderFrameHostManagerTest, CloseWithPendingWhileUnresponsive) {
// received. (SwapOut and the corresponding ACK always occur after commit.) // received. (SwapOut and the corresponding ACK always occur after commit.)
// Also tests that an early SwapOutACK is properly ignored. // Also tests that an early SwapOutACK is properly ignored.
TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) { TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) {
// When a page enters the BackForwardCache, the RenderFrameHost is not
// deleted. Similarly, no SwapOutACK message is sent.
contents()->GetController().GetBackForwardCache().DisableForTesting(
BackForwardCache::TEST_ASSUMES_NO_CACHING);
const GURL kUrl1("http://www.google.com/"); const GURL kUrl1("http://www.google.com/");
const GURL kUrl2("http://www.chromium.org/"); const GURL kUrl2("http://www.chromium.org/");
...@@ -1618,6 +1626,10 @@ TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) { ...@@ -1618,6 +1626,10 @@ TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) {
// Tests that the RenderFrameHost is properly swapped out when the SwapOut ACK // Tests that the RenderFrameHost is properly swapped out when the SwapOut ACK
// is received. (SwapOut and the corresponding ACK always occur after commit.) // is received. (SwapOut and the corresponding ACK always occur after commit.)
TEST_F(RenderFrameHostManagerTest, SwapOutFrameAfterSwapOutACK) { TEST_F(RenderFrameHostManagerTest, SwapOutFrameAfterSwapOutACK) {
// When a page enters the BackForwardCache, the RenderFrameHost is not
// deleted. Similarly, no SwapOutACK message is sent.
contents()->GetController().GetBackForwardCache().DisableForTesting(
BackForwardCache::TEST_ASSUMES_NO_CACHING);
const GURL kUrl1("http://www.google.com/"); const GURL kUrl1("http://www.google.com/");
const GURL kUrl2("http://www.chromium.org/"); const GURL kUrl2("http://www.chromium.org/");
...@@ -1660,6 +1672,10 @@ TEST_F(RenderFrameHostManagerTest, SwapOutFrameAfterSwapOutACK) { ...@@ -1660,6 +1672,10 @@ TEST_F(RenderFrameHostManagerTest, SwapOutFrameAfterSwapOutACK) {
// This simulates a cross-site navigation to a synchronously committing URL // This simulates a cross-site navigation to a synchronously committing URL
// (e.g., a data URL) and ensures it works properly. // (e.g., a data URL) and ensures it works properly.
TEST_F(RenderFrameHostManagerTest, CommitNewNavigationBeforeSendingSwapOut) { TEST_F(RenderFrameHostManagerTest, CommitNewNavigationBeforeSendingSwapOut) {
// When a page enters the BackForwardCache, the RenderFrameHost is not
// deleted. Similarly, no SwapOutACK message is sent.
contents()->GetController().GetBackForwardCache().DisableForTesting(
BackForwardCache::TEST_ASSUMES_NO_CACHING);
const GURL kUrl1("http://www.google.com/"); const GURL kUrl1("http://www.google.com/");
const GURL kUrl2("http://www.chromium.org/"); const GURL kUrl2("http://www.chromium.org/");
......
# These tests currently fail when run with --enable-features=BackForwardCache # These tests currently fail when run with --enable-features=BackForwardCache
# https://crbug.com/1019077
# Expects the process used by the previous document to exit.
-RenderFrameHostManagerTest.DeleteFrameAfterSwapOutACK
# https://crbug.com/1019077
# Check failed: is_waiting_for_swapout_ack_.
# The swap out mechanism isn't used with the BackForwardCache.
-RenderFrameHostManagerTest.CommitNewNavigationBeforeSendingSwapOut
-RenderFrameHostManagerTest.SwapOutFrameAfterSwapOutACK
# https://crbug.com/1019077
# navigation_simulator_impl.cc(581)] Check failed: state_ <= READY_TO_COMMIT
-RenderFrameHostManagerTest.NavigateAfterMissingSwapOutACK
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