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

Unified Diff: third_party/WebKit/LayoutTests/accessibility/misspellings.html

Issue 2202463002: ALL-IN-ONE Stop SpellChecker from checking or marking grammar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix layout test accessibility/misspellings.html Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/accessibility/misspellings.html
diff --git a/third_party/WebKit/LayoutTests/accessibility/misspellings.html b/third_party/WebKit/LayoutTests/accessibility/misspellings.html
index 396ea1d1e5987c0aa2e87135d9a011128bb77168..299957633ddc1ff7346752e88aaafb4ac27a8ff2 100644
--- a/third_party/WebKit/LayoutTests/accessibility/misspellings.html
+++ b/third_party/WebKit/LayoutTests/accessibility/misspellings.html
@@ -36,69 +36,76 @@
document.getElementById('editable').style.display = "none";;
t.done();
- }, 100);
+ }, 50);
}, 'Misspellings should be reported in content editables.');
async_test(function(t)
{
- document.designMode = 'on';
-
- step_timeout(function()
- {
- var axParagraph = accessibilityController.accessibleElementById('paragraph');
- var axStaticText = axParagraph.childAtIndex(0);
-
- assert_equals(axStaticText.misspellingsCount, 2);
- assert_equals(axStaticText.misspellingAtIndex(0), 'adaasj');
- assert_equals(axStaticText.misspellingAtIndex(1), 'sdklj');
-
- document.designMode = 'off';
- document.getElementById('paragraph').style.display = "none";;
- t.done();
+ step_timeout(function() {
+ document.designMode = 'on';
+ window.getSelection().collapse(document.getElementById('paragraph'), 0);
+
+ step_timeout(function()
+ {
+ var axParagraph = accessibilityController.accessibleElementById('paragraph');
+ var axStaticText = axParagraph.childAtIndex(0);
+
+ assert_equals(axStaticText.misspellingsCount, 2);
+ assert_equals(axStaticText.misspellingAtIndex(0), 'adaasj');
+ assert_equals(axStaticText.misspellingAtIndex(1), 'sdklj');
+
+ document.designMode = 'off';
+ document.getElementById('paragraph').style.display = "none";;
+ t.done();
+ }, 50);
}, 100);
}, 'Misspellings should be reported in static text when design mode is on.');
async_test(function(t)
{
- document.getElementById('input').focus();
- document.execCommand('InsertText', false, 'contentEditable ');
-
- step_timeout(function()
- {
- var axInput = accessibilityController.accessibleElementById('input');
- // If input's shadow DOM changes, this logic might need to be modified.
- assert_equals(axInput.childrenCount, 1);
- var axDiv = axInput.childAtIndex(0);
- assert_equals(axDiv.childrenCount, 1);
- var axStaticText = axDiv.childAtIndex(0);
-
- assert_equals(axStaticText.misspellingsCount, 1);
- assert_equals(axStaticText.misspellingAtIndex(0), 'contentEditable');
-
- document.getElementById('input').style.display = "none";;
- t.done();
- }, 100);
+ step_timeout(function() {
+ document.getElementById('input').focus();
+ document.execCommand('InsertText', false, 'contentEditable ');
+
+ step_timeout(function()
+ {
+ var axInput = accessibilityController.accessibleElementById('input');
+ // If input's shadow DOM changes, this logic might need to be modified.
+ assert_equals(axInput.childrenCount, 1);
+ var axDiv = axInput.childAtIndex(0);
+ assert_equals(axDiv.childrenCount, 1);
+ var axStaticText = axDiv.childAtIndex(0);
+
+ assert_equals(axStaticText.misspellingsCount, 1);
+ assert_equals(axStaticText.misspellingAtIndex(0), 'contentEditable');
+
+ document.getElementById('input').style.display = "none";;
+ t.done();
+ }, 50);
+ }, 200);
}, 'Misspellings should be reported in single-line text fields.');
async_test(function(t)
{
- document.getElementById('textarea').focus();
- document.execCommand('InsertText', false, 'contentEditable ');
-
- step_timeout(function()
- {
- var axTextarea = accessibilityController.accessibleElementById('textarea');
- // If textarea's shadow DOM changes, this logic might need to be modified.
- assert_equals(axTextarea.childrenCount, 1);
- var axDiv = axTextarea.childAtIndex(0);
- assert_equals(axDiv.childrenCount, 1);
- var axStaticText = axDiv.childAtIndex(0);
-
- assert_equals(axStaticText.misspellingsCount, 1);
- assert_equals(axStaticText.misspellingAtIndex(0), 'contentEditable');
-
- document.getElementById('textarea').style.display = "none";;
- t.done();
- }, 100);
+ step_timeout(function() {
+ document.getElementById('textarea').focus();
+ document.execCommand('InsertText', false, 'contentEditable ');
+
+ step_timeout(function()
+ {
+ var axTextarea = accessibilityController.accessibleElementById('textarea');
+ // If textarea's shadow DOM changes, this logic might need to be modified.
+ assert_equals(axTextarea.childrenCount, 1);
+ var axDiv = axTextarea.childAtIndex(0);
+ assert_equals(axDiv.childrenCount, 1);
+ var axStaticText = axDiv.childAtIndex(0);
+
+ assert_equals(axStaticText.misspellingsCount, 1);
+ assert_equals(axStaticText.misspellingAtIndex(0), 'contentEditable');
+
+ document.getElementById('textarea').style.display = "none";;
+ t.done();
+ }, 50);
+ }, 300);
}, 'Misspellings should be reported in textareas.');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698