Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>Tests handling of unmatched surrogate pairs</title> | |
| 5 <meta charset="utf16-be"> | |
| 6 </head> | |
| 7 <body> | |
| 8 <script> | |
| 9 if (window.testRunner) | |
| 10 testRunner.dumpAsText(); | |
| 11 | |
| 12 function appendLine(str) | |
| 13 { | |
| 14 var line = document.createElement('div'); | |
| 15 line.appendChild(document.createTextNode(str)); | |
| 16 document.body.appendChild(line); | |
| 17 } | |
| 18 | |
| 19 var globe = '\u{1F30E}'; | |
| 20 appendLine('Full codepoint, "\u{1F30E}". Prints a globle glyph.'); | |
|
bsittler
2015/08/11 18:11:00
tiny typo: s/globle/globe
| |
| 21 appendLine('First part of surrogate pair, "' + globe.substr(0, 1) + | |
| 22 '". Should print replacement character and rest of run.'); | |
| 23 appendLine('Second part of surrogate pair, "' + globe.substr(1, 1) + | |
| 24 '". Should print replacement character and rest of run.'); | |
| 25 </script> | |
| 26 </body> | |
| 27 </html> | |
| OLD | NEW |