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

Unified Diff: third_party/WebKit/LayoutTests/editing/spelling/delete-misspelled-word.html

Issue 2443143003: Convert editing/spelling/delete-misspelled-word with spellcheck_test (Closed)
Patch Set: Wed Oct 26 17:16:48 JST 2016 Created 4 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/spelling/delete-misspelled-word.html
diff --git a/third_party/WebKit/LayoutTests/editing/spelling/delete-misspelled-word.html b/third_party/WebKit/LayoutTests/editing/spelling/delete-misspelled-word.html
index b8a1942331d3a8937fb163866fca862350a24ce9..62f675d32bbd937c661ce1f2b0bce2e7addb85e0 100644
--- a/third_party/WebKit/LayoutTests/editing/spelling/delete-misspelled-word.html
+++ b/third_party/WebKit/LayoutTests/editing/spelling/delete-misspelled-word.html
@@ -1,36 +1,26 @@
<!DOCTYPE html>
<html>
<head>
-<script src=../../resources/testharness.js></script>
-<script src=../../resources/testharnessreport.js></script>
-<script src=resources/util.js></script>
-<title>Testing moving cursor to a misspelled word</title>
-</head>
-<body>
-<div id="src" contenteditable></div>
-<script>
-var node = document.getElementById('src');
-
-var steps = [
- function() {
- node.focus();
- document.execCommand('InsertText', false, 'z');
- document.execCommand('InsertText', false, 'z');
- document.execCommand('InsertText', false, ' ');
- },
- function() {
- testRunner.execCommand('DeleteBackward');
- testRunner.execCommand('DeleteBackward');
- document.execCommand('InsertText', false, ' ');
- }
-];
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<script src="spellcheck_test.js"></script>
-var assertions = [
- () => assert_true(internals.hasSpellingMarker(document, 0, 2)),
- () => assert_false(internals.hasSpellingMarker(document, 0, 1))
-];
-
-runSpellingTest(steps, assertions, 'Blink spellchecks a word again when changing a misspelled word');
+<script>
+spellcheck_test(
+ '<div contenteditable>zz&nbsp;|</div>',
+ '',
+ '<div contenteditable>_zz_ </div>',
+ {
+ title: 'Has marker on initially misspelled word.',
+ callback: sample => spellcheck_test(
+ sample,
+ document => {
+ testRunner.execCommand('DeleteBackward');
+ testRunner.execCommand('DeleteBackward');
+ document.execCommand('InsertText', false, ' ');
+ },
+ '<div contenteditable>z </div>',
+ 'Blink spellchecks a word again when changing a misspelled word')
+ });
</script>
-</body>
-</html>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698