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

Side by Side 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, 1 month 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src=../../resources/testharness.js></script> 4 <script src="../../resources/testharness.js"></script>
5 <script src=../../resources/testharnessreport.js></script> 5 <script src="../../resources/testharnessreport.js"></script>
6 <script src=resources/util.js></script> 6 <script src="../assert_selection.js"></script>
7 <title>Testing moving cursor to a misspelled word</title> 7 <script src="spellcheck_test.js"></script>
8 </head> 8
9 <body>
10 <div id="src" contenteditable></div>
11 <script> 9 <script>
12 var node = document.getElementById('src'); 10 spellcheck_test(
13 11 '<div contenteditable>zz&nbsp;|</div>',
14 var steps = [ 12 '',
15 function() { 13 '<div contenteditable>_zz_ </div>',
16 node.focus(); 14 {
17 document.execCommand('InsertText', false, 'z'); 15 title: 'Has marker on initially misspelled word.',
18 document.execCommand('InsertText', false, 'z'); 16 callback: sample => spellcheck_test(
19 document.execCommand('InsertText', false, ' '); 17 sample,
20 }, 18 document => {
21 function() { 19 testRunner.execCommand('DeleteBackward');
22 testRunner.execCommand('DeleteBackward'); 20 testRunner.execCommand('DeleteBackward');
23 testRunner.execCommand('DeleteBackward'); 21 document.execCommand('InsertText', false, ' ');
24 document.execCommand('InsertText', false, ' '); 22 },
25 } 23 '<div contenteditable>z </div>',
26 ]; 24 'Blink spellchecks a word again when changing a misspelled word')
27 25 });
28 var assertions = [
29 () => assert_true(internals.hasSpellingMarker(document, 0, 2)),
30 () => assert_false(internals.hasSpellingMarker(document, 0, 1))
31 ];
32
33 runSpellingTest(steps, assertions, 'Blink spellchecks a word again when changing a misspelled word');
34 </script> 26 </script>
35 </body>
36 </html>
OLDNEW
« 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