mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Implement cross origin resource policy check
I removed the window getter usage from those tests as servo does not support that yet.
This commit is contained in:
parent
6aec2c8594
commit
8249be38c9
14 changed files with 98 additions and 133 deletions
|
@ -424333,7 +424333,7 @@
|
|||
]
|
||||
],
|
||||
"image-loads.html": [
|
||||
"8a0458f107abdf2b7d6664fb8194e6b4b0222989",
|
||||
"060b7551ea516837cf416c797e85474658857632",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -424379,7 +424379,7 @@
|
|||
]
|
||||
],
|
||||
"script-loads.html": [
|
||||
"5850e0109f18c23e40d73686bef5e4b6a6b40686",
|
||||
"a9690fc70be13885d7ca6448730c83f755810774",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
|
|
@ -5,15 +5,3 @@
|
|||
[fetch-in-iframe]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin fetch in a data: iframe load fails if the server blocks cross-origin loads with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin fetch in a data: iframe load fails if the server blocks cross-origin loads with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin fetch in a cross origin iframe load fails if the server blocks cross-origin loads with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin fetch in a cross origin iframe load fails if the server blocks cross-origin loads with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -7,53 +7,11 @@
|
|||
[fetch]
|
||||
expected: FAIL
|
||||
|
||||
[Valid cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a redirection.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' redirect response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-scheme (HTTP to HTTPS) no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[fetch.any.worker.html]
|
||||
[fetch]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Valid cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a redirection.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' redirect response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-scheme (HTTP to HTTPS) no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[fetch.any.sharedworker.html]
|
||||
expected: ERROR
|
||||
|
|
|
@ -1,16 +1,4 @@
|
|||
[fetch.https.any.html]
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a redirection.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' redirect response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[fetch.https.any.serviceworker.html]
|
||||
expected: ERROR
|
||||
|
@ -25,18 +13,6 @@
|
|||
|
||||
|
||||
[fetch.https.any.worker.html]
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a redirection.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' redirect response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[fetch]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
[iframe-loads.html]
|
||||
[Untitled]
|
||||
expected: FAIL
|
||||
[Load an iframe that has Cross-Origin-Resource-Policy header]
|
||||
expected: FAIL
|
||||
|
||||
[iframe-loads]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
[image-loads.html]
|
||||
[Same-origin image load with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Same-origin image load with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin cors image load with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin cors image load with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors image load with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors image load with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
[scheme-restriction.any.html]
|
||||
[Cross-Origin-Resource-Policy: same-site blocks retrieving HTTPS from HTTP]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[scheme-restriction.any.worker.html]
|
||||
[Cross-Origin-Resource-Policy: same-site blocks retrieving HTTPS from HTTP]
|
||||
expected: FAIL
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
[script-loads.html]
|
||||
[Same-origin script load with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Same-origin script load with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin cors script load with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin cors script load with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors script load with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-origin no-cors script load with a 'Cross-Origin-Resource-Policy: same-site' response header.]
|
||||
expected: FAIL
|
||||
|
|
@ -16,6 +16,7 @@ const noCors = false;
|
|||
|
||||
function loadImage(url, shoudLoad, corsMode, title)
|
||||
{
|
||||
const testDiv = document.getElementById("testDiv");
|
||||
promise_test(() => {
|
||||
const img = new Image();
|
||||
if (corsMode)
|
||||
|
|
|
@ -16,6 +16,7 @@ const noCors = false;
|
|||
|
||||
function loadScript(url, shoudLoad, corsMode, title)
|
||||
{
|
||||
const testDiv = document.getElementById("testDiv");
|
||||
promise_test(() => {
|
||||
const script = document.createElement("script");
|
||||
if (corsMode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue