| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset="utf-8"> | 2 <meta charset="utf-8"> |
| 3 <style> | 3 <style> |
| 4 #container { | 4 #container { |
| 5 width: 100px; | 5 width: 100px; |
| 6 height: 100px; | 6 height: 100px; |
| 7 border: 1px solid black; | 7 border: 1px solid black; |
| 8 overflow: scroll; | 8 overflow: scroll; |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 assert_false(proxy.supports('scrollLef')); | 34 assert_false(proxy.supports('scrollLef')); |
| 35 assert_false(proxy.supports('scrollLefta')); | 35 assert_false(proxy.supports('scrollLefta')); |
| 36 | 36 |
| 37 assert_true(proxy.supports('scrollTop')); | 37 assert_true(proxy.supports('scrollTop')); |
| 38 assert_false(proxy.supports('scrollTo')); | 38 assert_false(proxy.supports('scrollTo')); |
| 39 assert_false(proxy.supports('scrollTopa')); | 39 assert_false(proxy.supports('scrollTopa')); |
| 40 | 40 |
| 41 assert_false(proxy.supports('あ')); | 41 assert_false(proxy.supports('あ')); |
| 42 | 42 |
| 43 // This is a hack to get a 16-bit string for a supported property. | 43 // This is a hack to get a 16-bit string for a supported property. |
| 44 var transform16 = new TextDecoder('utf-16').decode(new TextEncoder('utf-16')
.encode('transform')); | 44 var encoded = encode_utf16('transform', true); |
| 45 var transform16 = new TextDecoder('utf-16').decode(encoded); |
| 45 assert_true(transform16 === 'transform'); | 46 assert_true(transform16 === 'transform'); |
| 46 assert_true(proxy.supports(transform16)); | 47 assert_true(proxy.supports(transform16)); |
| 47 }, "This test ensures that supports correctly handles queries with strings that
a prefix of a property or vice versa."); | 48 }, "This test ensures that supports correctly handles queries with strings that
a prefix of a property or vice versa."); |
| 49 |
| 50 function encode_utf16(s, littleEndian) { |
| 51 var a = new Uint8Array(s.length * 2), view = new DataView(a.buffer); |
| 52 s.split('').forEach(function(c, i) { |
| 53 view.setUint16(i * 2, c.charCodeAt(0), littleEndian); |
| 54 }); |
| 55 return a; |
| 56 } |
| 48 </script> | 57 </script> |
| OLD | NEW |