mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Update web-platform-tests to revision 58462b6f92aab3eea03ad1ea70923855889ed1e2
This commit is contained in:
parent
05b8ba0a48
commit
a57b869a58
111 changed files with 3544 additions and 611 deletions
|
@ -32,13 +32,18 @@ function preflightTest(succeeds, withCredentials, allowMethod, allowHeader, useM
|
|||
}, "CORS that " + (succeeds ? "succeeds" : "fails") + " with credentials: " + withCredentials + "; method: " + useMethod + " (allowed: " + allowMethod + "); header: " + useHeader + " (allowed: " + allowHeader + ")")
|
||||
}
|
||||
|
||||
// "GET" does not pass the case-sensitive method check, but in the safe list.
|
||||
preflightTest(true, false, "get", "x-test", "GET", ["X-Test", "1"])
|
||||
// Headers check is case-insensitive, and "*" works as any for method.
|
||||
preflightTest(true, false, "*", "x-test", "SUPER", ["X-Test", "1"])
|
||||
// "*" works as any only without credentials.
|
||||
preflightTest(true, false, "*", "*", "OK", ["X-Test", "1"])
|
||||
preflightTest(false, true, "*", "*", "OK", ["X-Test", "1"])
|
||||
preflightTest(false, true, "*", "", "PUT", [])
|
||||
preflightTest(true, true, "PUT", "*", "PUT", [])
|
||||
preflightTest(false, true, "put", "*", "PUT", [])
|
||||
preflightTest(false, true, "get", "*", "GET", ["X-Test", "1"])
|
||||
preflightTest(false, true, "*", "*", "GET", ["X-Test", "1"])
|
||||
// Exact character match works even for "*" with credentials.
|
||||
preflightTest(true, true, "*", "*", "*", ["*", "1"])
|
||||
// "PUT" does not pass the case-sensitive method check, and not in the safe list.
|
||||
preflightTest(false, true, "put", "*", "PUT", [])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue