Commit a1aafb0b authored by Sreeja Kamishetty's avatar Sreeja Kamishetty Committed by Chromium LUCI CQ

Disable BackForwardCache for WebContentsImplTest.CrossSiteNavigationBackOldNavigationIgnored test

This CL disables BackForwardCache for
WebContentsImplTest.CrossSiteNavigationBackOldNavigationIgnored
test which assumes no interaction with the back-forward cache by
performing a commit on a stored BFCached entry directly.

Bug: 1163106
Change-Id: Id21e363950e71db70e7db302b57b8e02958ebb72
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2633441
Commit-Queue: Sreeja Kamishetty <sreejakshetty@chromium.org>
Reviewed-by: default avatarArthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#846069}
parent 07dfab40
...@@ -1156,6 +1156,13 @@ TEST_F(WebContentsImplTest, CrossSiteNavigationBackPreempted) { ...@@ -1156,6 +1156,13 @@ TEST_F(WebContentsImplTest, CrossSiteNavigationBackPreempted) {
// Tests that if we go back twice (same-site then cross-site), and the cross- // Tests that if we go back twice (same-site then cross-site), and the cross-
// site RFH commits first, we ignore the now-swapped-out RFH's commit. // site RFH commits first, we ignore the now-swapped-out RFH's commit.
TEST_F(WebContentsImplTest, CrossSiteNavigationBackOldNavigationIgnored) { TEST_F(WebContentsImplTest, CrossSiteNavigationBackOldNavigationIgnored) {
// This test assumes no interaction with the back-forward cache. Indeed, it
// isn't possible to perform the second back navigation in between the
// ReadyToCommit and Commit of the first back-forward cache one. Both steps
// are combined with it, nothing can happen in between.
contents()->GetController().GetBackForwardCache().DisableForTesting(
BackForwardCache::TEST_ASSUMES_NO_CACHING);
// Start with a web ui page, which gets a new RFH with WebUI bindings. // Start with a web ui page, which gets a new RFH with WebUI bindings.
GURL url1(std::string(kChromeUIScheme) + "://" + GURL url1(std::string(kChromeUIScheme) + "://" +
std::string(kChromeUIGpuHost)); std::string(kChromeUIGpuHost));
......
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