Bug 822298 - Window isn't focused so spellchecking doesn't happen, use waitForFocus first. a=test-only
authorNeil Deakin <neil@mozilla.com>
Mon, 30 Mar 2015 14:23:23 -0400
changeset 258226 fdb4e8b3eedb
parent 258225 d30e64ad7e1f
child 258227 09687ee1bf7e
push id4623
push userryanvm@gmail.com
push date2015-04-03 01:49 +0000
treeherdermozilla-beta@9c755cdc241c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstest-only
bugs822298
milestone38.0
Bug 822298 - Window isn't focused so spellchecking doesn't happen, use waitForFocus first. a=test-only
browser/base/content/test/general/test_contextmenu.html
--- a/browser/base/content/test/general/test_contextmenu.html
+++ b/browser/base/content/test/general/test_contextmenu.html
@@ -843,17 +843,17 @@ function waitForEvents(event)
 {
   if (event.type == "MozAfterPaint")
     painted = true;
   else if (event.type == "load")
     loaded = true;
   if (painted && loaded) {
     subwindow.removeEventListener("MozAfterPaint", waitForEvents, false);
     subwindow.onload = null;
-    startTest();
+    SimpleTest.waitForFocus(startTest, subwindow);
   }
 }
 
 SpecialPowers.setBoolPref("plugins.click_to_play", true);
 setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
 
 var subwindow = window.open("./subtst_contextmenu.html", "contextmenu-subtext", "width=600,height=800");
 subwindow.addEventListener("MozAfterPaint", waitForEvents, false);