Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: LayoutTests/fast/text/unmatched-surrogate-pair.html

Issue 1285633003: Change handling of unmatched surrogate pairs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressing reviewer comments Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/text/unmatched-surrogate-pair-expected.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 function appendLine(str)
10 {
11 var line = document.createElement('div');
12 line.appendChild(document.createTextNode(str));
13 document.body.appendChild(line);
14 }
15
16 var globe = '\u{1F30E}';
17 appendLine('Full codepoint, "\u{1F30E}". Prints a globe glyph.');
18 appendLine('First part of surrogate pair, "' + globe.substr(0, 1) +
19 '". Should print replacement character and rest of run.');
20 appendLine('Second part of surrogate pair, "' + globe.substr(1, 1) +
21 '". Should print replacement character and rest of run.');
22 document.body.appendChild(document.createElement('br'));
23
24 appendLine('Spanning text nodes:');
25 var nodeA = document.createTextNode('- First part "' +
26 globe.substr(0, 1));
27 var nodeB = document.createTextNode(globe.substr(1, 1) +
28 '" second part.');
29 var container = document.createElement('div');
30 container.appendChild(nodeA);
31 container.appendChild(nodeB);
32 document.body.appendChild(container);
33
34 appendLine('After element.normalize():');
35 var clone = container.cloneNode(true);
36 clone.normalize();
37 document.body.appendChild(clone);
38 </script>
39 </body>
40 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/text/unmatched-surrogate-pair-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698