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

Side by Side Diff: LayoutTests/editing/deleting/delete-ligature-001.html

Issue 484353004: Test tidying: use "escape" and "backspace" with eventSender.keyDown() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: More quoting consistency wibbles Created 6 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
OLDNEW
1 <html xmlns="http://www.w3.org/1999/xhtml"> 1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head> 2 <head>
3 <script src="../editing.js" language="javascript" type="text/javascript" ></script> 3 <script src="../editing.js" language="javascript" type="text/javascript" ></script>
4 <script language="javascript" type="text/javascript"> 4 <script language="javascript" type="text/javascript">
5 function log(str) { 5 function log(str) {
6 var li = document.createElement("li"); 6 var li = document.createElement("li");
7 li.appendChild(document.createTextNode(str)); 7 li.appendChild(document.createTextNode(str));
8 var console = document.getElementById("console"); 8 var console = document.getElementById("console");
9 console.appendChild(li); 9 console.appendChild(li);
10 } 10 }
11 function sendBackwardDeleteKey() { 11 function sendBackwardDeleteKey() {
12 if (window.eventSender) 12 if (window.eventSender)
13 eventSender.keyDown(String.fromCharCode(0x0008), null); 13 eventSender.keyDown("backspace", null);
14 } 14 }
15 function editingTest() { 15 function editingTest() {
16 if (window.testRunner) 16 if (window.testRunner)
17 window.testRunner.dumpAsText(); 17 window.testRunner.dumpAsText();
18 var textarea = document.getElementById("test"); 18 var textarea = document.getElementById("test");
19 textarea.focus(); 19 textarea.focus();
20 typeCharacterCommand(String.fromCharCode(0x0E27)); 20 typeCharacterCommand(String.fromCharCode(0x0E27));
21 typeCharacterCommand(String.fromCharCode(0x0E31)); 21 typeCharacterCommand(String.fromCharCode(0x0E31));
22 sendBackwardDeleteKey(); 22 sendBackwardDeleteKey();
23 if (textarea.value == "\u0E27") 23 if (textarea.value == "\u0E27")
24 log("Succeeded."); 24 log("Succeeded.");
25 else 25 else
26 log("Failed. Actual: \"" + textarea.value + "\", Expected: \"\u0 E27\""); 26 log("Failed. Actual: \"" + textarea.value + "\", Expected: \"\u0 E27\"");
27 } 27 }
28 </script> 28 </script>
29 <title>Editing Test (Deleting a ligature)</title> 29 <title>Editing Test (Deleting a ligature)</title>
30 </head> 30 </head>
31 <body> 31 <body>
32 <p>This test tests whether the BackSpace key deletes only the last chara cter of a ligature "&#x0E27;&#x0E31;".</p> 32 <p>This test tests whether the BackSpace key deletes only the last chara cter of a ligature "&#x0E27;&#x0E31;".</p>
33 <p>If this test succeeds, you can see "&#x0E27;" (U+0E27) and a string " succeeded" below.</p> 33 <p>If this test succeeds, you can see "&#x0E27;" (U+0E27) and a string " succeeded" below.</p>
34 <textarea id="test" rows="1" cols="40"></textarea> 34 <textarea id="test" rows="1" cols="40"></textarea>
35 <ul id="console"></ul> 35 <ul id="console"></ul>
36 <script language="javascript" type="text/javascript"> 36 <script language="javascript" type="text/javascript">
37 runEditingTest(); 37 runEditingTest();
38 </script> 38 </script>
39 </body> 39 </body>
40 </html> 40 </html>
OLDNEW
« no previous file with comments | « LayoutTests/editing/deleting/delete-by-word-002.html ('k') | LayoutTests/editing/deleting/delete-ligature-002.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698