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

Unified Diff: LayoutTests/editing/spelling/spellcheck-editable-on-focus-sync.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/spellcheck-editable-on-focus-sync.html
diff --git a/LayoutTests/editing/spelling/spellcheck-editable-on-focus-sync.html b/LayoutTests/editing/spelling/spellcheck-editable-on-focus-sync.html
index 7430dc823d2af971cff557d8cf4f0793d54b46dd..26d02763ce0d8ad471d33bd2e3815362675c7a15 100644
--- a/LayoutTests/editing/spelling/spellcheck-editable-on-focus-sync.html
+++ b/LayoutTests/editing/spelling/spellcheck-editable-on-focus-sync.html
@@ -5,7 +5,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>
<div id="container">
<div id="test_editable" contentEditable>zz zz zz. </div>
@@ -21,31 +21,27 @@ var testEditable = document.getElementById('test_editable');
var testTextArea = document.getElementById('test_textarea');
var testTextField = document.getElementById('test_textfield');
-function test()
+if (!window.internals)
{
- if (!window.internals)
- {
- log("Automatic testing impossible. Test manually.");
- return;
- }
-
- internals.settings.setUnifiedTextCheckerEnabled(true);
- internals.settings.setAsynchronousSpellCheckingEnabled(false);
- internals.setContinuousSpellCheckingEnabled(true);
+ log("Automatic testing impossible. Test manually.");
+ return;
+}
- shouldBe('internals.markerCountForNode(findFirstTextNode(testEditable), "spelling")', '0');
- testEditable.focus();
- shouldBe('internals.markerCountForNode(findFirstTextNode(testEditable), "spelling")', '3');
- shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spelling")', '0');
- testTextArea.focus();
- shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spelling")', '3');
- shouldBe('internals.markerCountForNode(findFirstTextNode(testTextField), "spelling")', '0');
- testTextField.focus();
- shouldBe('internals.markerCountForNode(findFirstTextNode(testTextField), "spelling")', '3');
+internals.settings.setUnifiedTextCheckerEnabled(true);
+internals.settings.setAsynchronousSpellCheckingEnabled(false);
+internals.setContinuousSpellCheckingEnabled(true);
-}
+shouldBe('internals.markerCountForNode(findFirstTextNode(testEditable), "spelling")', '0');
+testEditable.focus();
+shouldBe('internals.markerCountForNode(findFirstTextNode(testEditable), "spelling")', '3');
+shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spelling")', '0');
+testTextArea.focus();
+shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spelling")', '3');
+shouldBe('internals.markerCountForNode(findFirstTextNode(testTextField), "spelling")', '0');
+testTextField.focus();
+shouldBe('internals.markerCountForNode(findFirstTextNode(testTextField), "spelling")', '3');
</script>
<script src="../../fast/js/resources/js-test-post.js"></script>
</body>
-</html>
+</html>

Powered by Google App Engine
This is Rietveld 408576698