Changeset 293691 in webkit
- Timestamp:
- May 2, 2022, 3:48:00 PM (4 years ago)
- Location:
- trunk/LayoutTests/imported/w3c
- Files:
-
- 8 edited
-
ChangeLog (modified) (1 diff)
-
web-platform-tests/cookies/name/name-ctl-expected.txt (modified) (3 diffs)
-
web-platform-tests/cookies/name/name-ctl.html (modified) (2 diffs)
-
web-platform-tests/cookies/resources/cookie-test.js (modified) (1 diff)
-
web-platform-tests/cookies/value/value-ctl-expected.txt (modified) (3 diffs)
-
web-platform-tests/cookies/value/value-ctl.html (modified) (2 diffs)
-
web-platform-tests/html/dom/documents/resource-metadata-management/document-cookie-expected.txt (modified) (1 diff)
-
web-platform-tests/html/dom/documents/resource-metadata-management/document-cookie.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r293689 r293691 1 2022-05-02 Alex Christensen <achristensen@webkit.org> 2 3 Update some wpt tests with control characters in cookies 4 https://bugs.webkit.org/show_bug.cgi?id=239966 5 <rdar://92300855> 6 7 Reviewed by Chris Dumez. 8 9 This reflects a change in https://github.com/httpwg/http-extensions/issues/1531 10 11 * web-platform-tests/cookies/name/name-ctl-expected.txt: 12 * web-platform-tests/cookies/name/name-ctl.html: 13 * web-platform-tests/cookies/resources/cookie-test.js: 14 * web-platform-tests/cookies/value/value-ctl-expected.txt: 15 * web-platform-tests/cookies/value/value-ctl.html: 16 * web-platform-tests/html/dom/documents/resource-metadata-management/document-cookie-expected.txt: 17 * web-platform-tests/html/dom/documents/resource-metadata-management/document-cookie.html: 18 1 19 2022-05-02 Oriol Brufau <obrufau@igalia.com> 2 20 -
trunk/LayoutTests/imported/w3c/web-platform-tests/cookies/name/name-ctl-expected.txt
r279585 r293691 1 1 2 FAIL Cookie with %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test0" but got "" 3 FAIL Cookie with %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test10" but got "" 4 FAIL Cookie with %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test13" but got "" 2 PASS Cookie with %x0 in name is rejected. 5 3 PASS Cookie with %x1 in name is rejected. 6 4 PASS Cookie with %x2 in name is rejected. … … 11 9 PASS Cookie with %x7 in name is rejected. 12 10 PASS Cookie with %x8 in name is rejected. 13 FAIL Cookie with %x9 in name is rejected. assert_equals: The cookie was rejected. expected "" but got "test9\tname=9" 11 PASS Cookie with %x9 in name is accepted. 12 PASS Cookie with %xa in name is rejected. 14 13 PASS Cookie with %xb in name is rejected. 15 14 PASS Cookie with %xc in name is rejected. 15 PASS Cookie with %xd in name is rejected. 16 16 PASS Cookie with %xe in name is rejected. 17 17 PASS Cookie with %xf in name is rejected. … … 33 33 PASS Cookie with %x1f in name is rejected. 34 34 PASS Cookie with %x7f in name is rejected. 35 FAIL Cookie with %x1 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test1term" but got ""36 FAIL Cookie with %x2 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test2term" but got ""37 FAIL Cookie with %x3 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test3term" but got ""38 FAIL Cookie with %x4 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test4term" but got ""39 FAIL Cookie with %x5 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test5term" but got ""40 FAIL Cookie with %x6 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test6term" but got ""41 FAIL Cookie with %x7 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test7term" but got ""42 FAIL Cookie with %x8 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test8term" but got ""43 FAIL Cookie with %x9 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test9term" but got ""44 FAIL Cookie with %xb after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test11term" but got ""45 FAIL Cookie with %xc after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test12term" but got ""46 FAIL Cookie with %xe after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test14term" but got ""47 FAIL Cookie with %xf after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test15term" but got ""48 FAIL Cookie with %x10 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test16term" but got ""49 FAIL Cookie with %x11 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test17term" but got ""50 FAIL Cookie with %x12 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test18term" but got ""51 FAIL Cookie with %x13 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test19term" but got ""52 FAIL Cookie with %x14 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test20term" but got ""53 FAIL Cookie with %x15 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test21term" but got ""54 FAIL Cookie with %x16 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test22term" but got ""55 FAIL Cookie with %x17 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test23term" but got ""56 FAIL Cookie with %x18 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test24term" but got ""57 FAIL Cookie with %x19 after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test25term" but got ""58 FAIL Cookie with %x1a after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test26term" but got ""59 FAIL Cookie with %x1b after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test27term" but got ""60 FAIL Cookie with %x1c after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test28term" but got ""61 FAIL Cookie with %x1d after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test29term" but got ""62 FAIL Cookie with %x1e after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test30term" but got ""63 FAIL Cookie with %x1f after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test31term" but got ""64 FAIL Cookie with %x7f after %x0 in name is truncated. assert_equals: The cookie was set as expected. expected "test127term" but got ""65 FAIL Cookie with %x1 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test1term" but got ""66 FAIL Cookie with %x2 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test2term" but got ""67 FAIL Cookie with %x3 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test3term" but got ""68 FAIL Cookie with %x4 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test4term" but got ""69 FAIL Cookie with %x5 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test5term" but got ""70 FAIL Cookie with %x6 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test6term" but got ""71 FAIL Cookie with %x7 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test7term" but got ""72 FAIL Cookie with %x8 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test8term" but got ""73 FAIL Cookie with %x9 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test9term" but got ""74 FAIL Cookie with %xb after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test11term" but got ""75 FAIL Cookie with %xc after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test12term" but got ""76 FAIL Cookie with %xe after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test14term" but got ""77 FAIL Cookie with %xf after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test15term" but got ""78 FAIL Cookie with %x10 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test16term" but got ""79 FAIL Cookie with %x11 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test17term" but got ""80 FAIL Cookie with %x12 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test18term" but got ""81 FAIL Cookie with %x13 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test19term" but got ""82 FAIL Cookie with %x14 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test20term" but got ""83 FAIL Cookie with %x15 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test21term" but got ""84 FAIL Cookie with %x16 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test22term" but got ""85 FAIL Cookie with %x17 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test23term" but got ""86 FAIL Cookie with %x18 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test24term" but got ""87 FAIL Cookie with %x19 after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test25term" but got ""88 FAIL Cookie with %x1a after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test26term" but got ""89 FAIL Cookie with %x1b after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test27term" but got ""90 FAIL Cookie with %x1c after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test28term" but got ""91 FAIL Cookie with %x1d after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test29term" but got ""92 FAIL Cookie with %x1e after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test30term" but got ""93 FAIL Cookie with %x1f after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test31term" but got ""94 FAIL Cookie with %x7f after %xa in name is truncated. assert_equals: The cookie was set as expected. expected "test127term" but got ""95 FAIL Cookie with %x1 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test1term" but got ""96 FAIL Cookie with %x2 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test2term" but got ""97 FAIL Cookie with %x3 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test3term" but got ""98 FAIL Cookie with %x4 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test4term" but got ""99 FAIL Cookie with %x5 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test5term" but got ""100 FAIL Cookie with %x6 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test6term" but got ""101 FAIL Cookie with %x7 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test7term" but got ""102 FAIL Cookie with %x8 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test8term" but got ""103 FAIL Cookie with %x9 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test9term" but got ""104 FAIL Cookie with %xb after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test11term" but got ""105 FAIL Cookie with %xc after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test12term" but got ""106 FAIL Cookie with %xe after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test14term" but got ""107 FAIL Cookie with %xf after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test15term" but got ""108 FAIL Cookie with %x10 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test16term" but got ""109 FAIL Cookie with %x11 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test17term" but got ""110 FAIL Cookie with %x12 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test18term" but got ""111 FAIL Cookie with %x13 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test19term" but got ""112 FAIL Cookie with %x14 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test20term" but got ""113 FAIL Cookie with %x15 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test21term" but got ""114 FAIL Cookie with %x16 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test22term" but got ""115 FAIL Cookie with %x17 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test23term" but got ""116 FAIL Cookie with %x18 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test24term" but got ""117 FAIL Cookie with %x19 after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test25term" but got ""118 FAIL Cookie with %x1a after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test26term" but got ""119 FAIL Cookie with %x1b after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test27term" but got ""120 FAIL Cookie with %x1c after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test28term" but got ""121 FAIL Cookie with %x1d after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test29term" but got ""122 FAIL Cookie with %x1e after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test30term" but got ""123 FAIL Cookie with %x1f after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test31term" but got ""124 FAIL Cookie with %x7f after %xd in name is truncated. assert_equals: The cookie was set as expected. expected "test127term" but got ""125 35 -
trunk/LayoutTests/imported/w3c/web-platform-tests/cookies/name/name-ctl.html
r279585 r293691 8 8 <script src="/resources/testharness.js"></script> 9 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="/resources/testdriver.js"></script> 11 <script src="/resources/testdriver-vendor.js"></script> 10 12 <script src="/cookies/resources/cookie-test.js"></script> 11 13 </head> … … 15 17 // Tests for control characters (CTLs) in a cookie's name. 16 18 // CTLs are defined by RFC 5234 to be %x00-1F / %x7F. 17 const {TERMINATING_CTLS, CTLS}= getCtlCharacters();19 const CTLS = getCtlCharacters(); 18 20 19 // Start with a clean slate. 20 dropAllDomCookies(); 21 22 // Test that terminating CTLs truncate the cookie string. 23 for (const ctl of TERMINATING_CTLS) { 24 domCookieTest( 21 // All CTLs, with the exception of %x09 (the tab character), should 22 // cause the cookie to be rejected. 23 for (const ctl of CTLS) { 24 if (ctl.code === 0x09) { 25 domCookieTest( 25 26 `test${ctl.code}${ctl.chr}name=${ctl.code}`, 26 `test${ctl.code}`, 27 `Cookie with %x${ctl.code.toString(16)} in name is truncated.`); 28 } 29 30 // Test that other CTLs result in cookie rejection. 31 for (const ctl of CTLS) { 32 domCookieTest( 27 `test${ctl.code}${ctl.chr}name=${ctl.code}`, 28 `Cookie with %x${ctl.code.toString(16)} in name is accepted.`); 29 } else { 30 domCookieTest( 33 31 `test${ctl.code}${ctl.chr}name=${ctl.code}`, 34 32 '', 35 33 `Cookie with %x${ctl.code.toString(16)} in name is rejected.`); 36 }37 38 // Test that truncation due to terminating CTLs occurs first.39 for (const termCtl of TERMINATING_CTLS) {40 for (const ctl of CTLS) {41 domCookieTest(42 `test${ctl.code}term${termCtl.chr}na${ctl.chr}me=${ctl.code}`,43 `test${ctl.code}term`,44 `Cookie with %x${ctl.code.toString(16)} after ` +45 `%x${termCtl.code.toString(16)} in name is truncated.`);46 34 } 47 35 } -
trunk/LayoutTests/imported/w3c/web-platform-tests/cookies/resources/cookie-test.js
r279585 r293691 152 152 } 153 153 154 // Returns two arrays of control characters along with their ASCII codes. The 155 // TERMINATING_CTLS should result in termination of the cookie string. The 156 // remaining CTLS should result in rejection of the cookie. Control characters 157 // are defined by RFC 5234 to be %x00-1F / %x7F. 154 // Returns an array of control characters along with their ASCII codes. Control 155 // characters are defined by RFC 5234 to be %x00-1F / %x7F. 158 156 function getCtlCharacters() { 159 const termCtlCodes = [0x00 /* NUL */, 0x0A /* LF */, 0x0D /* CR */];160 157 const ctlCodes = [...Array(0x20).keys()] 161 .filter(i => termCtlCodes.indexOf(i) === -1)162 158 .concat([0x7F]); 163 return { 164 TERMINATING_CTLS: 165 termCtlCodes.map(i => ({code: i, chr: String.fromCharCode(i)})), 166 CTLS: ctlCodes.map(i => ({code: i, chr: String.fromCharCode(i)})) 167 }; 159 return ctlCodes.map(i => ({ code: i, chr: String.fromCharCode(i) })) 168 160 } -
trunk/LayoutTests/imported/w3c/web-platform-tests/cookies/value/value-ctl-expected.txt
r279585 r293691 1 1 2 PASS Cookie with %x0 in value is truncated. 3 PASS Cookie with %xa in value is truncated. 4 PASS Cookie with %xd in value is truncated. 2 FAIL Cookie with %x0 in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=0" 5 3 FAIL Cookie with %x1 in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=1" 6 4 FAIL Cookie with %x2 in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=2" … … 11 9 FAIL Cookie with %x7 in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=7" 12 10 FAIL Cookie with %x8 in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=8" 13 FAIL Cookie with %x9 in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=9\tvalue" 11 PASS Cookie with %x9 in value is accepted. 12 FAIL Cookie with %xa in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=10" 14 13 FAIL Cookie with %xb in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=11" 15 14 FAIL Cookie with %xc in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=12" 15 FAIL Cookie with %xd in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=13" 16 16 FAIL Cookie with %xe in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=14" 17 17 FAIL Cookie with %xf in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=15" … … 33 33 FAIL Cookie with %x1f in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=31" 34 34 FAIL Cookie with %x7f in value is rejected. assert_equals: The cookie was rejected. expected "" but got "test=127" 35 PASS Cookie with %x1 after %x0 in value is truncated.36 PASS Cookie with %x2 after %x0 in value is truncated.37 PASS Cookie with %x3 after %x0 in value is truncated.38 PASS Cookie with %x4 after %x0 in value is truncated.39 PASS Cookie with %x5 after %x0 in value is truncated.40 PASS Cookie with %x6 after %x0 in value is truncated.41 PASS Cookie with %x7 after %x0 in value is truncated.42 PASS Cookie with %x8 after %x0 in value is truncated.43 PASS Cookie with %x9 after %x0 in value is truncated.44 PASS Cookie with %xb after %x0 in value is truncated.45 PASS Cookie with %xc after %x0 in value is truncated.46 PASS Cookie with %xe after %x0 in value is truncated.47 PASS Cookie with %xf after %x0 in value is truncated.48 PASS Cookie with %x10 after %x0 in value is truncated.49 PASS Cookie with %x11 after %x0 in value is truncated.50 PASS Cookie with %x12 after %x0 in value is truncated.51 PASS Cookie with %x13 after %x0 in value is truncated.52 PASS Cookie with %x14 after %x0 in value is truncated.53 PASS Cookie with %x15 after %x0 in value is truncated.54 PASS Cookie with %x16 after %x0 in value is truncated.55 PASS Cookie with %x17 after %x0 in value is truncated.56 PASS Cookie with %x18 after %x0 in value is truncated.57 PASS Cookie with %x19 after %x0 in value is truncated.58 PASS Cookie with %x1a after %x0 in value is truncated.59 PASS Cookie with %x1b after %x0 in value is truncated.60 PASS Cookie with %x1c after %x0 in value is truncated.61 PASS Cookie with %x1d after %x0 in value is truncated.62 PASS Cookie with %x1e after %x0 in value is truncated.63 PASS Cookie with %x1f after %x0 in value is truncated.64 PASS Cookie with %x7f after %x0 in value is truncated.65 PASS Cookie with %x1 after %xa in value is truncated.66 PASS Cookie with %x2 after %xa in value is truncated.67 PASS Cookie with %x3 after %xa in value is truncated.68 PASS Cookie with %x4 after %xa in value is truncated.69 PASS Cookie with %x5 after %xa in value is truncated.70 PASS Cookie with %x6 after %xa in value is truncated.71 PASS Cookie with %x7 after %xa in value is truncated.72 PASS Cookie with %x8 after %xa in value is truncated.73 PASS Cookie with %x9 after %xa in value is truncated.74 PASS Cookie with %xb after %xa in value is truncated.75 PASS Cookie with %xc after %xa in value is truncated.76 PASS Cookie with %xe after %xa in value is truncated.77 PASS Cookie with %xf after %xa in value is truncated.78 PASS Cookie with %x10 after %xa in value is truncated.79 PASS Cookie with %x11 after %xa in value is truncated.80 PASS Cookie with %x12 after %xa in value is truncated.81 PASS Cookie with %x13 after %xa in value is truncated.82 PASS Cookie with %x14 after %xa in value is truncated.83 PASS Cookie with %x15 after %xa in value is truncated.84 PASS Cookie with %x16 after %xa in value is truncated.85 PASS Cookie with %x17 after %xa in value is truncated.86 PASS Cookie with %x18 after %xa in value is truncated.87 PASS Cookie with %x19 after %xa in value is truncated.88 PASS Cookie with %x1a after %xa in value is truncated.89 PASS Cookie with %x1b after %xa in value is truncated.90 PASS Cookie with %x1c after %xa in value is truncated.91 PASS Cookie with %x1d after %xa in value is truncated.92 PASS Cookie with %x1e after %xa in value is truncated.93 PASS Cookie with %x1f after %xa in value is truncated.94 PASS Cookie with %x7f after %xa in value is truncated.95 PASS Cookie with %x1 after %xd in value is truncated.96 PASS Cookie with %x2 after %xd in value is truncated.97 PASS Cookie with %x3 after %xd in value is truncated.98 PASS Cookie with %x4 after %xd in value is truncated.99 PASS Cookie with %x5 after %xd in value is truncated.100 PASS Cookie with %x6 after %xd in value is truncated.101 PASS Cookie with %x7 after %xd in value is truncated.102 PASS Cookie with %x8 after %xd in value is truncated.103 PASS Cookie with %x9 after %xd in value is truncated.104 PASS Cookie with %xb after %xd in value is truncated.105 PASS Cookie with %xc after %xd in value is truncated.106 PASS Cookie with %xe after %xd in value is truncated.107 PASS Cookie with %xf after %xd in value is truncated.108 PASS Cookie with %x10 after %xd in value is truncated.109 PASS Cookie with %x11 after %xd in value is truncated.110 PASS Cookie with %x12 after %xd in value is truncated.111 PASS Cookie with %x13 after %xd in value is truncated.112 PASS Cookie with %x14 after %xd in value is truncated.113 PASS Cookie with %x15 after %xd in value is truncated.114 PASS Cookie with %x16 after %xd in value is truncated.115 PASS Cookie with %x17 after %xd in value is truncated.116 PASS Cookie with %x18 after %xd in value is truncated.117 PASS Cookie with %x19 after %xd in value is truncated.118 PASS Cookie with %x1a after %xd in value is truncated.119 PASS Cookie with %x1b after %xd in value is truncated.120 PASS Cookie with %x1c after %xd in value is truncated.121 PASS Cookie with %x1d after %xd in value is truncated.122 PASS Cookie with %x1e after %xd in value is truncated.123 PASS Cookie with %x1f after %xd in value is truncated.124 PASS Cookie with %x7f after %xd in value is truncated.125 35 -
trunk/LayoutTests/imported/w3c/web-platform-tests/cookies/value/value-ctl.html
r279585 r293691 8 8 <script src="/resources/testharness.js"></script> 9 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="/resources/testdriver.js"></script> 11 <script src="/resources/testdriver-vendor.js"></script> 10 12 <script src="/cookies/resources/cookie-test.js"></script> 11 13 </head> … … 15 17 // Tests for control characters (CTLs) in a cookie's value. 16 18 // CTLs are defined by RFC 5234 to be %x00-1F / %x7F. 17 const {TERMINATING_CTLS, CTLS}= getCtlCharacters();19 const CTLS = getCtlCharacters(); 18 20 19 // Start with a clean slate. 20 dropAllDomCookies(); 21 22 // Test that terminating CTLs truncate the cookie string. 23 for (const ctl of TERMINATING_CTLS) { 24 domCookieTest( 21 // All CTLs, with the exception of %x09 (the tab character), should 22 // cause the cookie to be rejected. 23 for (const ctl of CTLS) { 24 if (ctl.code === 0x09) { 25 domCookieTest( 25 26 `test=${ctl.code}${ctl.chr}value`, 26 `test=${ctl.code}`, 27 `Cookie with %x${ctl.code.toString(16)} in value is truncated.`); 28 } 29 30 // Test that other CTLs result in cookie rejection. 31 for (const ctl of CTLS) { 32 domCookieTest( 27 `test=${ctl.code}${ctl.chr}value`, 28 `Cookie with %x${ctl.code.toString(16)} in value is accepted.`); 29 } else { 30 domCookieTest( 33 31 `test=${ctl.code}${ctl.chr}value`, 34 32 '', 35 33 `Cookie with %x${ctl.code.toString(16)} in value is rejected.`); 36 }37 38 // Test that truncation due to terminating CTLs occurs first.39 for (const termCtl of TERMINATING_CTLS) {40 for (const ctl of CTLS) {41 domCookieTest(42 `test=${ctl.code}term${termCtl.chr}va${ctl.chr}lue`,43 `test=${ctl.code}term`,44 `Cookie with %x${ctl.code.toString(16)} after ` +45 `%x${termCtl.code.toString(16)} in value is truncated.`);46 34 } 47 35 } -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/resource-metadata-management/document-cookie-expected.txt
r267646 r293691 3 3 PASS document.cookie 4 4 PASS document.cookie 1 5 PASS document.cookie 2 5 FAIL document.cookie 2 assert_equals: expected "" but got "b=A" 6 6 PASS getting cookie for a cookie-averse document returns empty string, setting does nothing 7 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/resource-metadata-management/document-cookie.html
r263903 r293691 12 12 {value: "", expected: "", test: "Empty value"}, 13 13 {value: "a=b", expected: "a=b", test: "A simple cookie"}, 14 {value: "b=A\0Z", expected: " b=A", test: "A null char"},14 {value: "b=A\0Z", expected: "", test: "A null char"}, 15 15 ]; 16 16
Note:
See TracChangeset
for help on using the changeset viewer.