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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/deleting/skip-virama-001.html

Issue 2299513002: Convert editing/deleting/skip-virama-001.html to use w3c test harness (Closed)
Patch Set: 2016-08-31T11:18:29 Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/deleting/skip-virama-001-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <!doctype html>
2 <head> 2 <script src="../../resources/testharness.js"></script>
3 <title>Editing Test (Skipping a virama sign)</title> 3 <script src="../../resources/testharnessreport.js"></script>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 4 <script src="../assert_selection.js"></script>
5 <script src="../editing.js" language="javascript" type="text/javascript"></scrip t> 5 <script>
6 <script language="javascript" type="text/javascript"> 6 test(() => assert_selection(
7 function log(str) { 7 '<div contenteditable>|\u0915\u094D\u0937</div>',
8 var li = document.createElement("li"); 8 selection => {
9 li.appendChild(document.createTextNode(str)); 9 assert_not_equals(window.eventSender, undefined,
10 var console = document.getElementById("console"); 10 'This test requires eventSender');
11 console.appendChild(li); 11 eventSender.keyDown('Backspace', null);
12 } 12 },
13 function sendBackwardDeleteKey() { 13 '<div contenteditable>|\u0915\u094D\u0937</div>'),
14 if (window.eventSender) 14 'prevent a cursor from moving after a virama sign');
15 eventSender.keyDown("Backspace", null);
16 }
17 function editingTest() {
18 if (window.testRunner)
19 testRunner.dumpAsText();
20 var testarea = document.getElementById("test");
21 testarea.focus();
22 typeCharacterCommand(String.fromCharCode(0x0915));
23 typeCharacterCommand(String.fromCharCode(0x094D));
24 typeCharacterCommand(String.fromCharCode(0x0937));
25 moveSelectionBackwardByCharacterCommand();
26 sendBackwardDeleteKey();
27 var expected_result = "\u0915\u094D\u0937";
28 if (testarea.textContent == expected_result)
29 log("Succeeded.");
30 else
31 log("Failed. Actual: \"" + testarea.textContent + "\", Expected: \"" + e xpected_result + "\".");
32 }
33 </script> 15 </script>
34 </head>
35 <body>
36 <p>This test tests whether or not we can prevent a cursor from moving after a vi rama sign.</p>
37 <p>If this test succeeds, you can see a string "succeeded" below.</p>
38 <div contenteditable id="test"></div>
39 <ul id="console"></ul>
40 <script language="javascript" type="text/javascript">
41 runEditingTest();
42 </script>
43 </body>
44 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/deleting/skip-virama-001-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698