Commit c979302d authored by Lowell Manners's avatar Lowell Manners Committed by Commit Bot

[bfcache] Disable BackForwardCache for two tests.

These tests expect the window.unload event to fire, but this does not
happen by design if BackForwardCache is enabled.

TBR=clamy@chromium.org

Change-Id: Ica712043d4e593f33b407cc985f7c77c1f55a69e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823845
Commit-Queue: Lowell Manners <lowell@chromium.org>
Reviewed-by: default avatarArthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699765}
parent 3de52c05
......@@ -29,6 +29,7 @@
#include "content/browser/renderer_host/render_widget_host_view_child_frame.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/frame_messages.h"
#include "content/public/browser/back_forward_cache.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/browser_test_utils.h"
......@@ -473,6 +474,9 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, SlowUnloadHandlerInIframe) {
// Navigate from A(B(A(B)) to C. Check the unload handler are executed, executed
// in the right order and the processes for A and B are removed.
IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, Unload_ABAB) {
web_contents()->GetController().GetBackForwardCache().DisableForTesting(
content::BackForwardCache::TEST_USES_UNLOAD_EVENT);
GURL initial_url(embedded_test_server()->GetURL(
"a.com", "/cross_site_iframe_factory.html?a(b(a(b)))"));
GURL next_url(embedded_test_server()->GetURL("c.com", "/title1.html"));
......@@ -608,6 +612,9 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, UnloadNestedPendingDeletion) {
// If B1 receives FrameHostMsg_OnDetach before A2, it should not destroy itself
// and its children, but rather wait for A2.
IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, PartialUnloadHandler) {
web_contents()->GetController().GetBackForwardCache().DisableForTesting(
content::BackForwardCache::TEST_USES_UNLOAD_EVENT);
GURL url_aba(embedded_test_server()->GetURL(
"a.com", "/cross_site_iframe_factory.html?a(b(a))"));
GURL url_c(embedded_test_server()->GetURL("c.com", "/title1.html"));
......
......@@ -52,10 +52,6 @@
# happen when the BackForwardCache is used to store the old document.
-RenderFrameHostManagerTest.RenderViewInitAfterNewProxyAndProcessKill
# Waiting for unload handler, but they aren't executed.
-SitePerProcessBrowserTest.PartialUnloadHandler
-SitePerProcessBrowserTest.Unload_ABAB
# FATAL:casting.h Security DCHECK failed: IsA<Derived>(from).
# In content::RenderFrameProxy::OnSetFrameOwnerProperties()
# https://crbug.com/999849
......
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