| 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..b30e86a40371808d691bd5d7e2814b3e6c88c8fb 100644
|
| --- a/third_party/WebKit/LayoutTests/accessibility/misspellings.html
|
| +++ b/third_party/WebKit/LayoutTests/accessibility/misspellings.html
|
| @@ -36,69 +36,77 @@
|
|
|
| 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';
|
| + // Trigger spell checking on originally static text.
|
| + 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>
|
|
|