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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/deleting/delete-ligature-002.html
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/delete-ligature-002.html b/third_party/WebKit/LayoutTests/editing/deleting/delete-ligature-002.html
index 25322ac75d49dcd6cf30a46637bd50306869f398..2420b5ff8a453d0a4b41a0467215a47ca0ebe870 100644
--- a/third_party/WebKit/LayoutTests/editing/deleting/delete-ligature-002.html
+++ b/third_party/WebKit/LayoutTests/editing/deleting/delete-ligature-002.html
@@ -1,42 +1,17 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <script src="../editing.js" language="javascript" type="text/javascript" ></script>
- <script language="javascript" type="text/javascript">
- function log(str) {
- var li = document.createElement("li");
- li.appendChild(document.createTextNode(str));
- var console = document.getElementById("console");
- console.appendChild(li);
- }
- function sendBackwardDeleteKey() {
- if (window.eventSender)
- eventSender.keyDown("Backspace", null);
- }
- function editingTest() {
- if (window.testRunner)
- testRunner.dumpAsText();
- var testarea = document.getElementById("test");
- testarea.focus();
- typeCharacterCommand(String.fromCharCode(0x0E27));
- typeCharacterCommand(String.fromCharCode(0x0E31));
- moveSelectionBackwardByCharacterCommand();
- moveSelectionForwardByCharacterCommand();
- sendBackwardDeleteKey();
- if (testarea.textContent == "\u0E27")
- log("Succeeded.");
- else
- log("Failed. Actual: \"" + testarea.textContent + "\", Expected: \"\u0E27\"");
- }
- </script>
- <title>Editing Test (Deleting a ligature)</title>
- </head>
- <body>
- <p>This test tests whether the BackSpace key deletes only the last character of a ligature "&#x0E27;&#x0E31;".</p>
- <p>If this test succeeds, you can see "&#x0E27;" (U+0E27) and a string "succeeded" below.</p>
- <div id="test" contenteditable></div>
- <ul id="console"></ul>
- <script language="javascript" type="text/javascript">
- runEditingTest();
- </script>
- </body>
-</html>
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<script>
+test(() => {
+ assert_not_equals(window.eventSender, undefined,
+ 'This test requires window.eventSender');
+ assert_selection(
+ '<div contenteditable>\u0E27\u0E31|</div>',
+ selection => {
+ selection.document.defaultView.focus();
+ eventSender.keyDown('Backspace', null);
+ },
+ '<div contenteditable>\u0E27|</div>');
+ }, 'Backspace key should delete only last character of \u0E27\u0E31');
+</script>
« 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