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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/deleting/delete-ligature-002.html

Issue 2164883002: Convert editing/deleting/delete-ligature-002.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-20T14:51:35 Created 4 years, 5 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/delete-ligature-002-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 xmlns="http://www.w3.org/1999/xhtml"> 1 <!doctype html>
2 <head> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../editing.js" language="javascript" type="text/javascript" ></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script language="javascript" type="text/javascript"> 4 <script src="../assert_selection.js"></script>
5 function log(str) { 5 <script>
6 var li = document.createElement("li"); 6 test(() => {
7 li.appendChild(document.createTextNode(str)); 7 assert_not_equals(window.eventSender, undefined,
8 var console = document.getElementById("console"); 8 'This test requires window.eventSender');
9 console.appendChild(li); 9 assert_selection(
10 } 10 '<div contenteditable>\u0E27\u0E31|</div>',
11 function sendBackwardDeleteKey() { 11 selection => {
12 if (window.eventSender) 12 selection.document.defaultView.focus();
13 eventSender.keyDown("Backspace", null); 13 eventSender.keyDown('Backspace', null);
14 } 14 },
15 function editingTest() { 15 '<div contenteditable>\u0E27|</div>');
16 if (window.testRunner) 16 }, 'Backspace key should delete only last character of \u0E27\u0E31');
17 testRunner.dumpAsText(); 17 </script>
18 var testarea = document.getElementById("test");
19 testarea.focus();
20 typeCharacterCommand(String.fromCharCode(0x0E27));
21 typeCharacterCommand(String.fromCharCode(0x0E31));
22 moveSelectionBackwardByCharacterCommand();
23 moveSelectionForwardByCharacterCommand();
24 sendBackwardDeleteKey();
25 if (testarea.textContent == "\u0E27")
26 log("Succeeded.");
27 else
28 log("Failed. Actual: \"" + testarea.textContent + "\", Expected: \"\u0E27\"");
29 }
30 </script>
31 <title>Editing Test (Deleting a ligature)</title>
32 </head>
33 <body>
34 <p>This test tests whether the BackSpace key deletes only the last chara cter of a ligature "&#x0E27;&#x0E31;".</p>
35 <p>If this test succeeds, you can see "&#x0E27;" (U+0E27) and a string " succeeded" below.</p>
36 <div id="test" contenteditable></div>
37 <ul id="console"></ul>
38 <script language="javascript" type="text/javascript">
39 runEditingTest();
40 </script>
41 </body>
42 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/deleting/delete-ligature-002-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698