hash-collision.html (1622B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Test string hash collision in bucketing</title> 5 <meta rel="author" href="mailto:sesse@chromium.org" title="Steinar H. Gunderson"> 6 <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> 7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharnessreport.js"></script> 9 <style> 10 /* These strings all collide in Blink's AtomicString hash function. */ 11 .abetfx { --a: a; } 12 .adqcne { --b: b; } 13 .anztgy { --c: c; } 14 .jkeyea { --d: d; } 15 .ltjjvc { --e: e; } 16 .osniry { --f: f; } 17 .otgvil { --g: g; } 18 .ppvdzg { --h: h; } 19 .pwkbxn { --i: i; } 20 .rkefup { --j: j; } 21 .wsqwrf { --k: k; } 22 .zzpnvg { --l: l; } 23 </style> 24 </head> 25 <body> 26 <div id="d" class="abetfx adqcne anztgy jkeyea ltjjvc osniry otgvil ppvdzg pwkbxn rkefup wsqwrf zzpnvg">Some text</div> 27 <script> 28 test(() => { 29 const cs = getComputedStyle(d); 30 assert_equals('a', cs.getPropertyValue('--a')); 31 assert_equals('b', cs.getPropertyValue('--b')); 32 assert_equals('c', cs.getPropertyValue('--c')); 33 assert_equals('d', cs.getPropertyValue('--d')); 34 assert_equals('e', cs.getPropertyValue('--e')); 35 assert_equals('f', cs.getPropertyValue('--f')); 36 assert_equals('g', cs.getPropertyValue('--g')); 37 assert_equals('h', cs.getPropertyValue('--h')); 38 assert_equals('i', cs.getPropertyValue('--i')); 39 assert_equals('j', cs.getPropertyValue('--j')); 40 assert_equals('k', cs.getPropertyValue('--k')); 41 assert_equals('l', cs.getPropertyValue('--l')); 42 }); 43 </script> 44 </body> 45 </html>