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

Unified Diff: LayoutTests/editing/spelling/spellcheck-editable-on-focus.html

Issue 74003003: spellcheck-editable-on-focus.html does not tests all elements (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/editing/spelling/spellcheck-editable-on-focus-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/spelling/spellcheck-editable-on-focus.html
diff --git a/LayoutTests/editing/spelling/spellcheck-editable-on-focus.html b/LayoutTests/editing/spelling/spellcheck-editable-on-focus.html
index 00177acb8d2fc931997946f787ef67c863c315f3..ba72d8366ab55e7d88f0ed729145c458fc7e64a2 100644
--- a/LayoutTests/editing/spelling/spellcheck-editable-on-focus.html
+++ b/LayoutTests/editing/spelling/spellcheck-editable-on-focus.html
@@ -22,7 +22,7 @@ var testEditable = document.getElementById('test_editable');
var testTextArea = document.getElementById('test_textarea');
var testTextField = document.getElementById('test_textfield');
-function setFocusOnEditableElements() {
+function triggerSpellingForEditables() {
testEditable.focus();
testTextArea.focus();
testTextField.focus();
@@ -30,13 +30,11 @@ function setFocusOnEditableElements() {
var expectedNumberOfMarkers;
var textNode;
-
function verifySpellingMarkers(expectation, doneCallback) {
expectedNumberOfMarkers = expectation;
- textNode = findFirstTextNode(testEditable);
- shouldBecomeEqual('internals.markerCountForNode(textNode, "spelling")', 'expectedNumberOfMarkers', function() {
- shouldBecomeEqual('internals.markerCountForNode(textNode, "spelling")', 'expectedNumberOfMarkers', function() {
- shouldBecomeEqual('internals.markerCountForNode(textNode, "spelling")', 'expectedNumberOfMarkers', function() {
+ shouldBecomeEqual('internals.markerCountForNode(findFirstTextNode(testEditable), "spelling")', 'expectedNumberOfMarkers', function() {
+ shouldBecomeEqual('internals.markerCountForNode(findFirstTextNode(testTextArea), "spelling")', 'expectedNumberOfMarkers', function() {
+ shouldBecomeEqual('internals.markerCountForNode(findFirstTextNode(testTextField), "spelling")', 'expectedNumberOfMarkers', function() {
doneCallback();
// After focusing the editable elements, check whether they have spelling markers.
verifySpellingMarkers(3, finishJSTest);
@@ -56,7 +54,7 @@ function test() {
// Check whether non-focused elements do not have spelling markers, then
// verify them when they get focused.
- verifySpellingMarkers(0, setFocusOnEditableElements);
+ verifySpellingMarkers(0, triggerSpellingForEditables);
}
</script>
« no previous file with comments | « no previous file | LayoutTests/editing/spelling/spellcheck-editable-on-focus-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698