LibWeb+LibWebView: Set the default path for invalid cookie Path values

We were missing this spec step when parsing the Path attribute.
This commit is contained in:
Timothy Flynn 2024-09-18 12:41:53 -04:00 committed by Tim Ledbetter
commit e74d2b1762
Notes: github-actions[bot] 2024-09-18 23:02:58 +00:00
8 changed files with 64 additions and 47 deletions

View file

@ -60,6 +60,16 @@
printCookies("Non-ASCII domain");
};
const defaultPathTest = () => {
document.cookie = "cookie1=value; path=";
document.cookie = "cookie2=value; path=f";
printCookies("Default path");
deleteCookie("cookie1");
deleteCookie("cookie2");
};
const secureCookiePrefixTest = () => {
document.cookie = "__Secure-cookie=value";
printCookies("Secure cookie prefix");
@ -179,6 +189,7 @@
invalidControlCharacterTest();
nonASCIIDomainTest();
defaultPathTest();
secureCookiePrefixTest();
hostCookiePrefixTest();