Bug 1158920 - Yield to the event loop before reading the spelling suggestions
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 27 Apr 2015 15:08:10 -0400
changeset 241241 e44777d69e7a949a3fbaaae37e3c7986c9847e49
parent 241240 531631f340210c8e885b0f9a34ec00e1d474a15b
child 241242 762d5d1fcc072aa3e6e40be277cce04f30feefff
push id59064
push usereakhgari@mozilla.com
push dateMon, 27 Apr 2015 19:09:35 +0000
treeherdermozilla-inbound@e44777d69e7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1158920
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1158920 - Yield to the event loop before reading the spelling suggestions
editor/libeditor/tests/test_bug1154791.html
--- a/editor/libeditor/tests/test_bug1154791.html
+++ b/editor/libeditor/tests/test_bug1154791.html
@@ -31,22 +31,24 @@ SimpleTest.waitForFocus(function() {
   synthesizeKey("VK_LEFT", {});
   synthesizeKey("VK_LEFT", {});
 
   setTimeout(function() {
     synthesizeKey("VK_BACK_SPACE", {});
     setTimeout(function() {
       synthesizeKey(" ", {});
 
-      var sel = getSpellCheckSelection();
-      is(sel.rangeCount, 2, "We should have two misspelled words");
-      is(String(sel.getRangeAt(0)), "thiss", "Correct misspelled word");
-      is(String(sel.getRangeAt(1)), "onee", "Correct misspelled word");
+      setTimeout(function() {
+        var sel = getSpellCheckSelection();
+        is(sel.rangeCount, 2, "We should have two misspelled words");
+        is(String(sel.getRangeAt(0)), "thiss", "Correct misspelled word");
+        is(String(sel.getRangeAt(1)), "onee", "Correct misspelled word");
 
-      SimpleTest.finish();
+        SimpleTest.finish();
+      },0);
     },0);
   },0);
 
 });
 
 function getSpellCheckSelection() {
   var Ci = Components.interfaces;
   var editingSession = window.QueryInterface(Ci.nsIInterfaceRequestor)