OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
3 <title>Tests for known named character references</title> | 3 <title>Tests for known named character references</title> |
4 <meta name=viewport content="width=device-width"> | 4 <meta name=viewport content="width=device-width"> |
5 <!-- Alternative output: http://mathias.html5.org/tests/html/named-character-re
ferences/ --> | 5 <!-- Alternative output: http://mathias.html5.org/tests/html/named-character-ref
erences/ --> |
6 <div id=log></div> | 6 <div id=log></div> |
7 <script src=/resources/testharness.js></script> | 7 <script src=/resources/testharness.js></script> |
8 <script src=/resources/testharnessreport.js></script> | 8 <script src=/resources/testharnessreport.js></script> |
9 <script src=named-character-references-data.js></script> | 9 <script src=named-character-references-data.js></script> |
10 <script> | 10 <script> |
11 (function() { | 11 (function() { |
12 | 12 |
13 function pad(string, totalCharacters) { | 13 function pad(string, totalCharacters) { |
14 return totalCharacters < string.length ? string : (Array(totalCharacters +
1).join('0') + string).slice(-totalCharacters); | 14 return totalCharacters < string.length ? string : (Array(totalCharacters +
1).join('0') + string).slice(-totalCharacters); |
15 } | 15 } |
(...skipping 11 matching lines...) Expand all Loading... |
27 ); | 27 ); |
28 }, | 28 }, |
29 entity + ' should match ' + object.codepoints.map(function(codePoint) { | 29 entity + ' should match ' + object.codepoints.map(function(codePoint) { |
30 return 'U+' + pad(codePoint.toString(16).toUpperCase(), 5); | 30 return 'U+' + pad(codePoint.toString(16).toUpperCase(), 5); |
31 }).join(' ') | 31 }).join(' ') |
32 ); | 32 ); |
33 }); | 33 }); |
34 | 34 |
35 }()); | 35 }()); |
36 </script> | 36 </script> |
OLD | NEW |