Commit 1c1107d4 authored by Alex Turner's avatar Alex Turner Committed by Commit Bot

Bypass cross origin prefetch browsertest if split cache is enabled

Cross-origin prefetching is not currently supported when the split
cache is enabled. This breaks the SignedExchangePrefetchBrowserTest/
SignedExchangePrefetchBrowserTest.PrefetchMainResourceSXG_CrossOrigin/0
test. We thus bypass the failing checks if split cache is enabled.

Bug: 1009607
Change-Id: Iede3c1a2f71e3e4472fb5b91724a984898d5b4e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1838333Reviewed-by: default avatarTsuyoshi Horo <horo@chromium.org>
Reviewed-by: default avatarShivani Sharma <shivanisha@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705985}
parent 4b8a2d9a
...@@ -286,6 +286,17 @@ class SignedExchangePrefetchBrowserTest ...@@ -286,6 +286,17 @@ class SignedExchangePrefetchBrowserTest
// Shutdown the server. // Shutdown the server.
EXPECT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete()); EXPECT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete());
// The HTTP Cache does not currently support cross-origin prefetching if
// the split cache is enabled, so skip the rest of the tests.
// TODO(crbug.com/939317): Remove this early return when cross-origin
// prefetching with split cache works.
if (base::FeatureList::IsEnabled(
net::features::kSplitCacheByNetworkIsolationKey) &&
!url::Origin::Create(sxg_url).IsSameOriginWith(
url::Origin::Create(inner_url))) {
return;
}
// Need to setup MockSignedExchangeHandlerFactory because the SXG is // Need to setup MockSignedExchangeHandlerFactory because the SXG is
// loaded from HTTPCache. // loaded from HTTPCache.
MockSignedExchangeHandlerFactory factory({MockSignedExchangeHandlerParams( MockSignedExchangeHandlerFactory factory({MockSignedExchangeHandlerParams(
......
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