Commit 3a9215b3 authored by Alex Turner's avatar Alex Turner Committed by Commit Bot

Adapt isolated-code-cache web tests to partitioned HTTP Cache

The not-site-per-process isolated-code-cache web tests currently assume
that cross-origin resources are cached when code cache site isolation is
not active. This causes them to fail when the HTTP Cache is partitioned
by Network Isolation Key. We thus disable the partitioned HTTP Cache for
those tests and add a new test for when site isolation is not active,
but the HTTP Cache is still partitioned.

Bug: 1009628
Change-Id: I0d5d438d9564d3f659b93484a5bcc8aa56d2cd26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865421Reviewed-by: default avatarShivani Sharma <shivanisha@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707360}
parent 7ac5af60
...@@ -746,10 +746,17 @@ ...@@ -746,10 +746,17 @@
"--disable-features=WebAssemblyBaseline", "--disable-features=WebAssemblyBaseline",
"--site-per-process"] "--site-per-process"]
}, },
{
"prefix": "split-http-cache-not-site-per-process",
"base": "http/tests/devtools/isolated-code-cache",
"args": ["--enable-features=SplitCacheByNetworkIsolationKey",
"--disable-site-isolation-trials"]
},
{ {
"prefix": "not-site-per-process", "prefix": "not-site-per-process",
"base": "http/tests/devtools/isolated-code-cache", "base": "http/tests/devtools/isolated-code-cache",
"args": ["--disable-site-isolation-trials"] "args": ["--disable-site-isolation-trials",
"--disable-features=SplitCacheByNetworkIsolationKey"]
}, },
{ {
"prefix": "not-site-per-process", "prefix": "not-site-per-process",
......
...@@ -15,7 +15,11 @@ behave in presence of out-of-process iframes. ...@@ -15,7 +15,11 @@ behave in presence of out-of-process iframes.
Tests under `virtual/not-site-per-process` are run with Tests under `virtual/not-site-per-process` are run with
`--disable-site-isolation-trials` cmdline flag which turns off site `--disable-site-isolation-trials` cmdline flag which turns off site
isolation. This is needed to preserve test coverage provided by around isolation. This is needed to preserve test coverage provided by around
60 tests that fail when run with site isolation. 60 tests that fail when run with site isolation. `isolated-code-cache` tests are
also run with `--disable-features=SplitCacheByNetworkIsolationKey` which turns
off HTTP cache partitioning. This is needed as a test expects cross-origin
resources to be cached. Equivalent tests with the feature enabled can be found
under `virtual/split-http-cache-not-site-per-process`.
When modifying the list of files that behave differently with and without When modifying the list of files that behave differently with and without
OOPIFs, please consider modifying all the locations below: OOPIFs, please consider modifying all the locations below:
......
# This suite runs the tests in http/tests/devtools/isolated-code-cache with
# --enable-features=SplitCacheByNetworkIsolationKey
# --disable-site-isolation-trials
# This feature partitions the HTTP cache by network isolation key for improved
# security. Tracking bug: crbug.com/910708. This test disables site isolation,
# which would cause similar results.
Tests V8 code cache for javascript resources
---First navigation - produce and consume code cache ------
v8.compile Properties:
{
data : {
columnNumber : 0
lineNumber : 0
notStreamedReason : "script too small"
streamed : <boolean>
url : .../devtools/resources/v8-cache-script.js
}
endTime : <number>
startTime : <number>
type : "v8.compile"
}
Text details for v8.compile: v8-cache-script.js:1
v8.compile Properties:
{
data : {
columnNumber : 0
lineNumber : 0
notStreamedReason : "already used streamed data"
streamed : <boolean>
url : .../devtools/resources/v8-cache-script.js
}
endTime : <number>
startTime : <number>
type : "v8.compile"
}
Text details for v8.compile: v8-cache-script.js:1
v8.compile Properties:
{
data : {
columnNumber : 0
lineNumber : 0
notStreamedReason : "already used streamed data"
producedCacheSize : <number>
streamed : <boolean>
url : .../devtools/resources/v8-cache-script.js
}
endTime : <number>
startTime : <number>
type : "v8.compile"
}
Text details for v8.compile: v8-cache-script.js:1
v8.compile Properties:
{
data : {
cacheConsumeOptions : "code"
cacheRejected : false
columnNumber : 0
consumedCacheSize : <number>
lineNumber : 0
notStreamedReason : "already used streamed data"
streamed : <boolean>
url : .../devtools/resources/v8-cache-script.js
}
endTime : <number>
startTime : <number>
type : "v8.compile"
}
Text details for v8.compile: v8-cache-script.js:1
--- Second navigation - from a different origin ------
v8.compile Properties:
{
data : {
columnNumber : 0
lineNumber : 0
notStreamedReason : "script too small"
streamed : <boolean>
url : .../devtools/resources/v8-cache-script.js
}
endTime : <number>
startTime : <number>
type : "v8.compile"
}
Text details for v8.compile: v8-cache-script.js:1
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