__secure.document-cookie.https.html (1406B)
1 <!DOCTYPE html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <script src="/cookies/resources/cookie-helper.sub.js"></script> 5 <script> 6 ["", "MaxAge=10", "domain="+document.location.hostname].forEach(extraParams => { 7 // Without 'secure' 8 set_prefixed_cookie_via_dom_test({ 9 prefix: "__Secure-", 10 params: "Path=/;" + extraParams, 11 shouldExistInDOM: false, 12 shouldExistViaHTTP: false, 13 title: "__Secure: Secure origin: Should not set 'Path=/;" + extraParams + "'" 14 }); 15 16 set_prefixed_cookie_via_dom_test({ 17 prefix: "__SeCuRe-", 18 params: "Path=/;" + extraParams, 19 shouldExistInDOM: false, 20 shouldExistViaHTTP: false, 21 title: "__SeCuRe: Secure origin: Should not set 'Path=/;" + extraParams + "'" 22 }); 23 24 // With 'secure' 25 set_prefixed_cookie_via_dom_test({ 26 prefix: "__Secure-", 27 params: "Secure; Path=/;" + extraParams, 28 shouldExistInDOM: true, 29 shouldExistViaHTTP: true, 30 title: "__Secure: Secure origin: Should set 'Secure; Path=/;" + extraParams + "'" 31 }); 32 33 set_prefixed_cookie_via_dom_test({ 34 prefix: "__SeCuRe-", 35 params: "Secure; Path=/;" + extraParams, 36 shouldExistInDOM: true, 37 shouldExistViaHTTP: true, 38 title: "__SeCuRe: Secure origin: Should set 'Secure; Path=/;" + extraParams + "'" 39 }); 40 }); 41 </script>