mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision b'3ee7ccc2abbbc8d8f6efbb45f80bffdb3c0c76ba'
This commit is contained in:
parent
111363d338
commit
2ebdfcea9d
630 changed files with 8297 additions and 4979 deletions
|
@ -126,11 +126,11 @@ async function DeleteCookieInFrame(frame, name, params) {
|
|||
}
|
||||
|
||||
// Tests whether the frame can write cookies via document.cookie. Note that this
|
||||
// overwrites, then deletes, cookies named "cookie" and "foo".
|
||||
// overwrites, then optionally deletes, cookies named "cookie" and "foo".
|
||||
//
|
||||
// This function requires the caller to have included
|
||||
// /cookies/resources/cookie-helper.sub.js.
|
||||
async function CanFrameWriteCookies(frame) {
|
||||
async function CanFrameWriteCookies(frame, keep_after_writing = false) {
|
||||
const cookie_suffix = "Secure;SameSite=None;Path=/";
|
||||
await DeleteCookieInFrame(frame, "cookie", cookie_suffix);
|
||||
await DeleteCookieInFrame(frame, "foo", cookie_suffix);
|
||||
|
@ -142,8 +142,10 @@ async function CanFrameWriteCookies(frame) {
|
|||
const can_write = cookieStringHasCookie("cookie", "monster", cookies) &&
|
||||
cookieStringHasCookie("foo", "bar", cookies);
|
||||
|
||||
await DeleteCookieInFrame(frame, "cookie", cookie_suffix);
|
||||
await DeleteCookieInFrame(frame, "foo", cookie_suffix);
|
||||
if (!keep_after_writing) {
|
||||
await DeleteCookieInFrame(frame, "cookie", cookie_suffix);
|
||||
await DeleteCookieInFrame(frame, "foo", cookie_suffix);
|
||||
}
|
||||
|
||||
return can_write;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue