header-parsing-failures.https.html (2434B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <meta name=timeout content=long> 4 <meta name="variant" content="?1-4"> 5 <meta name="variant" content="?5-8"> 6 <meta name="variant" content="?9-12"> 7 <meta name="variant" content="?12-last"> 8 <script src=/resources/testharness.js></script> 9 <script src=/resources/testharnessreport.js></script> 10 <script src="/common/dispatcher/dispatcher.js"></script> 11 <script src="/common/get-host-info.sub.js"></script> 12 <script src="/common/subset-tests.js"></script> 13 <script src="/common/utils.js"></script> 14 <script src="resources/common.js"></script> 15 <script src="resources/popup-test.js"></script> 16 <script> 17 18 [ 19 // None of the following should be recognized as "same-origin" (hence the 20 // preserved opener). 21 { 22 "title": "coop with semi-column", 23 "coop": "same-origin;", 24 }, 25 { 26 "title": "coop with vertical tab", 27 "coop": "\u000bsame-origin\u000b", 28 }, 29 { 30 "title": "coop with form feed", 31 "coop": "\u000csame-origin\u000c", 32 }, 33 { 34 "title": "coop with carriage return", 35 "coop": "\u000dsame-origin\u000d", 36 }, 37 { 38 "title": "coop with capital letter", 39 "coop": "Same-origin", 40 }, 41 { 42 "title": "coop with bad structured header 1", 43 "coop": "same-origin;\tfoo=bar", 44 }, 45 { 46 "title": "coop with bad structured header 2", 47 "coop": "same-origin ;foo=bar", 48 }, 49 { 50 "title": "coop with bad structured header 3", 51 "coop": "same-origin; foo=bar;", 52 }, 53 { 54 "title": "coop as a structured header 'string' item", 55 "coop": "\"same-origin\"", 56 }, 57 { 58 "title": "coop as a structured header 'byte sequence' item", 59 "coop": ":c2FtZS1vcmlnaW4=:", 60 }, 61 { 62 "title": "coop as a structured header 'boolean' item", 63 "coop": "?1", 64 }, 65 { 66 "title": "coop as a structured header 'integer or decimal' item", 67 "coop": "1", 68 }, 69 { 70 "title": "coop as an unrecognized structured header type", 71 "coop": "$same-origin", 72 }, 73 { 74 "title": "coop with duplicate value", 75 "coop": "same-origin same-origin", 76 }, 77 { 78 // Note: comma must be escaped here to not mess with the WPT pipe function. 79 "title": "coop with duplicate value, separated by a comma", 80 "coop": "same-origin\\,same-origin", 81 }, 82 { 83 "title": "coop with preceding asterisk character", 84 "coop": "*same-origin ", 85 } 86 ].forEach(variant => { 87 subsetTest(popup_test, `Parsing ${variant.title}`, SAME_ORIGIN, { coop: variant.coop }, "preserved"); 88 }); 89 90 </script>