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

Unified 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, 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/deleting/skip-virama-001.html
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/skip-virama-001.html b/third_party/WebKit/LayoutTests/editing/deleting/skip-virama-001.html
index dd67c18d6be2ac941fa6da69af0b416893c744c7..47ed69103a94fa54d40818cffd19ba3e939150b3 100644
--- a/third_party/WebKit/LayoutTests/editing/deleting/skip-virama-001.html
+++ b/third_party/WebKit/LayoutTests/editing/deleting/skip-virama-001.html
@@ -1,44 +1,15 @@
-<html>
-<head>
-<title>Editing Test (Skipping a virama sign)</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<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(0x0915));
- typeCharacterCommand(String.fromCharCode(0x094D));
- typeCharacterCommand(String.fromCharCode(0x0937));
- moveSelectionBackwardByCharacterCommand();
- sendBackwardDeleteKey();
- var expected_result = "\u0915\u094D\u0937";
- if (testarea.textContent == expected_result)
- log("Succeeded.");
- else
- log("Failed. Actual: \"" + testarea.textContent + "\", Expected: \"" + expected_result + "\".");
-}
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<script>
+ test(() => assert_selection(
+ '<div contenteditable>|\u0915\u094D\u0937</div>',
+ selection => {
+ assert_not_equals(window.eventSender, undefined,
+ 'This test requires eventSender');
+ eventSender.keyDown('Backspace', null);
+ },
+ '<div contenteditable>|\u0915\u094D\u0937</div>'),
+ 'prevent a cursor from moving after a virama sign');
</script>
-</head>
-<body>
-<p>This test tests whether or not we can prevent a cursor from moving after a virama sign.</p>
-<p>If this test succeeds, you can see a string "succeeded" below.</p>
-<div contenteditable id="test"></div>
-<ul id="console"></ul>
-<script language="javascript" type="text/javascript">
-runEditingTest();
-</script>
-</body>
-</html>
« 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