servo/tests/wpt/meta/content-security-policy/inheritance
Tim van der Lippe 8a837778d9
Create new image cache per document (#36832)
Rather than sharing the full image cache in a script_thread, the image
cache is now unique per document. This ensures that CSP factors no
longer affect whether the image is retrieved from the cache incorrectly.

To do so, the thread_pool is shared across all caches, but the store is
fresh. Except for the place_holder{image,url}, which are cloned. That's
because the `rippy_data` is only available in the constellation and no
longer accessible at the point that we need to create the document in
the script_thread.

Contrary to the description in #36505, the script_thread still has an
image_cache for this reason: so it has access to the store and
thread_pool to clone it.

With these changes, the two CSP tests no longer flake. Confirmed with
running the following commmand:

```
./mach test-wpt tests/wpt/tests/content-security-policy/generic/ --rerun=10
```

Fixes #36505

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-05-04 20:20:56 +00:00
..
blob-url-in-child-frame-self-navigate-inherits.sub.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
blob-url-in-main-window-self-navigate-inherits.sub.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
blob-url-inherits-from-initiator.sub.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
frame-src-javascript-url.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
history-iframe.sub.html.ini Create new image cache per document (#36832) 2025-05-04 20:20:56 +00:00
history.sub.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
iframe-all-local-schemes.sub.html.ini Create new image cache per document (#36832) 2025-05-04 20:20:56 +00:00
iframe-srcdoc-history-inheritance.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
inheritance-from-initiator.sub.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
javascript-url-open-in-main-window.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
javascript-url-srcdoc-cross-origin-iframe-inheritance.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
location-reload.html.ini Create new image cache per document (#36832) 2025-05-04 20:20:56 +00:00
sandboxed-blob-scheme.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
sandboxed-data-scheme.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
unsandboxed-blob-scheme.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
unsandboxed-data-scheme.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
window-open-local-after-network-scheme.sub.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00
window.html.ini Run all CSP tests in CI by default. (#36436) 2025-04-10 08:09:23 +00:00