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

Side by Side Diff: LayoutTests/editing/selection/regional-indicators.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p>This test checks how character breaks are computed for regional indicator cha racters.</p> 7 <p>This test checks how character breaks are computed for regional indicator cha racters.</p>
8 <div contenteditable id="test">🇯🇵🇯🇵🇯🇵</div> <!-- (j)(p)(j)(p)(j)(p) --> 8 <div contenteditable id="test">🇯🇵🇯🇵🇯🇵</div> <!-- (j)(p)(j)(p)(j)(p) -->
9 <div id="console"></div> 9 <div id="console"></div>
10 <script> 10 <script>
11 11
12 var div = document.getElementById("test"); 12 var div = document.getElementById("test");
13 var afterLastIndicator = document.createRange(); 13 var afterLastIndicator = document.createRange();
14 14
15 afterLastIndicator.setStart(div.firstChild, 12); 15 afterLastIndicator.setStart(div.firstChild, 12);
16 document.getSelection().addRange(afterLastIndicator); 16 document.getSelection().addRange(afterLastIndicator);
17 document.getSelection().modify("extend", "left", "character"); 17 document.getSelection().modify("extend", "left", "character");
18 shouldBe("document.getSelection().toString()", "'🇯🇵'"); 18 shouldBe("document.getSelection().toString()", "'🇯🇵'");
19 19
20 div.innerText = "🇯🇵🇯🇵"; 20 div.innerText = "🇯🇵🇯🇵";
21 afterLastIndicator.setStart(div.firstChild, 8); 21 afterLastIndicator.setStart(div.firstChild, 8);
22 getSelection().removeAllRanges(); 22 getSelection().removeAllRanges();
23 document.getSelection().addRange(afterLastIndicator); 23 document.getSelection().addRange(afterLastIndicator);
24 document.getSelection().modify("extend", "left", "character"); 24 document.getSelection().modify("extend", "left", "character");
25 shouldBe("document.getSelection().toString()", "'🇯🇵'"); 25 shouldBe("document.getSelection().toString()", "'🇯🇵'");
26 26
27 27
28 </script> 28 </script>
29 </body> 29 </body>
30 </html> 30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698