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

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

Issue 23444027: TEST COMPLETE does not appear at the end of spellchecking tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 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
Index: LayoutTests/editing/spelling/markers-input-type-text.html
diff --git a/LayoutTests/editing/spelling/markers-input-type-text.html b/LayoutTests/editing/spelling/markers-input-type-text.html
index 866a84abd082009da6f2b80715f2e96c1d80a772..8cf635ef23c67baff3749eb5fe477e8ee0f7bd80 100644
--- a/LayoutTests/editing/spelling/markers-input-type-text.html
+++ b/LayoutTests/editing/spelling/markers-input-type-text.html
@@ -12,7 +12,7 @@
<script src="resources/util.js"></script>
<script src="../../fast/js/resources/js-test-pre.js"></script>
</head>
-<body onload="test();">
+<body>
<pre id="console"></pre>
<textarea id="testTextArea"></textarea><br/>
<input type="text" id="testInput" /><br/>
@@ -25,37 +25,35 @@ description("Markers in text inputs should only be visible if an input is being
"focus the text input and type something with misspellings there too." +
"Then focus the second text area. Mispelling marks should be removed from the input" +
"but not for the first textarea. Focus the input again - misspelling marks should be restored.");
-function test()
-{
- var testTextArea = document.getElementById("testTextArea");
- var testInput = document.getElementById("testInput");
- if (!window.internals) {
- log("Test manually. See the description for steps.");
- return;
- }
+var testTextArea = document.getElementById("testTextArea");
+var testInput = document.getElementById("testInput");
- internals.settings.setUnifiedTextCheckerEnabled(true);
+if (!window.internals) {
+ log("Test manually. See the description for steps.");
+ return;
+}
- if (window.testRunner)
- testRunner.dumpAsText();
+internals.settings.setUnifiedTextCheckerEnabled(true);
- typeText(testTextArea, 'zz. ');
- shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spelling")', '1');
+if (window.testRunner)
+ testRunner.dumpAsText();
- typeText(testInput, 'zz zz zz zz. ');
- shouldBe('internals.markerCountForNode(findFirstTextNode(testInput), "spelling")', '4');
+typeText(testTextArea, 'zz. ');
+shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spelling")', '1');
- document.getElementById("aux").focus();
+typeText(testInput, 'zz zz zz zz. ');
+shouldBe('internals.markerCountForNode(findFirstTextNode(testInput), "spelling")', '4');
- shouldBe('internals.markerCountForNode(findFirstTextNode(testInput), "spelling")', '0');
- shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spelling")', '1');
+document.getElementById("aux").focus();
- testInput.focus();
+shouldBe('internals.markerCountForNode(findFirstTextNode(testInput), "spelling")', '0');
+shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spelling")', '1');
- shouldBe('internals.markerCountForNode(findFirstTextNode(testInput), "spelling")', '4');
- shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spelling")', '1');
-}
+testInput.focus();
+
+shouldBe('internals.markerCountForNode(findFirstTextNode(testInput), "spelling")', '4');
+shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spelling")', '1');
</script>
<script src="../../fast/js/resources/js-test-post.js"></script>
</body>

Powered by Google App Engine
This is Rietveld 408576698