Bug 1504179 - Trigger first spell-checking by moving focus to contenteditable element. r=smaug, a=test-only
authorEdgar Chen <echen@mozilla.com>
Wed, 14 Nov 2018 12:38:46 +0000
changeset 498556 3bf260797a3209d498dec6d5125ce3297bf1ab73
parent 498555 d2cc42af8c92d25849ebcc61b83f983dcc12fad5
child 498557 089ee02f019d2e06af1a443248425cf5a792265d
push id10219
push userryanvm@gmail.com
push dateFri, 16 Nov 2018 16:50:39 +0000
treeherdermozilla-beta@3bf260797a32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, test-only
bugs1504179
milestone64.0
Bug 1504179 - Trigger first spell-checking by moving focus to contenteditable element. r=smaug, a=test-only The current test has an incorrect expectation for the first full spell-checking, it actually happens when first-time focus moves to contenteditable element (which trigger dictionary updating), not right after document loaded. Differential Revision: https://phabricator.services.mozilla.com/D11463
editor/libeditor/tests/test_bug1497480.html
--- a/editor/libeditor/tests/test_bug1497480.html
+++ b/editor/libeditor/tests/test_bug1497480.html
@@ -46,16 +46,17 @@ function getEditor() {
 add_task(async function() {
   await new Promise((resolve) => {
     SimpleTest.waitForFocus(() => {
       SimpleTest.executeSoon(resolve);
     }, window);
   });
 
   // Wait for first full spell-checking.
+  synthesizeMouseAtCenter(outOfTarget, {}, window);
   await new Promise((resolve) => {
     onSpellCheck(outOfTarget, function() {
       resolve();
     });
   });
 });
 
 // Should perform spell-checking when anchor navigates away from ShadowDOM.