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

Side by Side Diff: LayoutTests/editing/spelling/markers-input-type-text.html

Issue 43803002: dumpAsText() is unnecessarily called in spellchecking tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 .editing { 5 .editing {
6 border: 2px solid red; 6 border: 2px solid red;
7 padding: 12px; 7 padding: 12px;
8 font-size: 24px; 8 font-size: 24px;
9 } 9 }
10 </style> 10 </style>
(...skipping 18 matching lines...) Expand all
29 var testTextArea = document.getElementById("testTextArea"); 29 var testTextArea = document.getElementById("testTextArea");
30 var testInput = document.getElementById("testInput"); 30 var testInput = document.getElementById("testInput");
31 31
32 if (!window.internals) { 32 if (!window.internals) {
33 log("Test manually. See the description for steps."); 33 log("Test manually. See the description for steps.");
34 return; 34 return;
35 } 35 }
36 36
37 internals.settings.setUnifiedTextCheckerEnabled(true); 37 internals.settings.setUnifiedTextCheckerEnabled(true);
38 38
39 if (window.testRunner)
40 testRunner.dumpAsText();
41
42 typeText(testTextArea, 'zz. '); 39 typeText(testTextArea, 'zz. ');
43 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spellin g")', '1'); 40 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spellin g")', '1');
44 41
45 typeText(testInput, 'zz zz zz zz. '); 42 typeText(testInput, 'zz zz zz zz. ');
46 shouldBe('internals.markerCountForNode(findFirstTextNode(testInput), "spelling") ', '4'); 43 shouldBe('internals.markerCountForNode(findFirstTextNode(testInput), "spelling") ', '4');
47 44
48 document.getElementById("aux").focus(); 45 document.getElementById("aux").focus();
49 46
50 shouldBe('internals.markerCountForNode(findFirstTextNode(testInput), "spelling") ', '0'); 47 shouldBe('internals.markerCountForNode(findFirstTextNode(testInput), "spelling") ', '0');
51 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spellin g")', '1'); 48 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spellin g")', '1');
52 49
53 testInput.focus(); 50 testInput.focus();
54 51
55 shouldBe('internals.markerCountForNode(findFirstTextNode(testInput), "spelling") ', '4'); 52 shouldBe('internals.markerCountForNode(findFirstTextNode(testInput), "spelling") ', '4');
56 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spellin g")', '1'); 53 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spellin g")', '1');
57 </script> 54 </script>
58 <script src="../../fast/js/resources/js-test-post.js"></script> 55 <script src="../../fast/js/resources/js-test-post.js"></script>
59 </body> 56 </body>
60 </html> 57 </html>
OLDNEW
« no previous file with comments | « LayoutTests/editing/spelling/markers.html ('k') | LayoutTests/editing/spelling/spellcheck-async.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698