Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / deleting / regional-indicators.html
blob895913ea50d45cc7e6755db041b8774c99da997d
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4 </head>
5 <body>
6 <p>This test checks how backspacing works with regional indicator characters.</p>
7 <div contenteditable id="test">🇯🇵🇯🇵🇯🇵</div> <!-- (j)(p)(j)(p)(j)(p) -->
8 <script>
9 if (window.testRunner)
10 testRunner.dumpAsText();
12 var div = document.getElementById("test");
13 var afterLastIndicator = document.createRange();
14 afterLastIndicator.setStart(div.firstChild, 12);
15 document.getSelection().addRange(afterLastIndicator);
16 document.execCommand("Delete");
17 document.write("1. Delete a flag: " + (div.textContent == "🇯🇵🇯🇵" ? "PASS" : "FAIL") + "<br>");
19 div.innerText = "a🇯" // a, (j)
20 afterLastIndicator.setStart(div.firstChild, 3);
21 document.getSelection().removeAllRanges();
22 document.getSelection().addRange(afterLastIndicator);
23 document.execCommand("Delete");
24 document.write("2. Delete a lone regional indicator character: " + (div.textContent == "a" ? "PASS" : "FAIL"));
25 </script>
26 </body>
27 </html>