Bug 931641 - Intermittent test_contextmenu_nested.xul failure, r=ehsan
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Thu, 28 Nov 2013 18:48:25 +0200
changeset 158037 e6484a878eeed6df777567c9767e1dd7b8f59231
parent 158036 129bf6f1933cb4fa535b1dfd106cd731f9cf1e99
child 158038 ad8d31f4bd394f68ef4de022aae306772d60d9d7
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersehsan
bugs931641
milestone28.0a1
Bug 931641 - Intermittent test_contextmenu_nested.xul failure, r=ehsan
toolkit/content/tests/widgets/test_contextmenu_nested.xul
--- a/toolkit/content/tests/widgets/test_contextmenu_nested.xul
+++ b/toolkit/content/tests/widgets/test_contextmenu_nested.xul
@@ -73,17 +73,19 @@ var popupTests = [
   }
 },
 {
   testname: "open inner context",
   condition: function() { return (navigator.platform.indexOf("Mac") == -1); },
   events: [ "DOMMenuItemActive outercontextmenu", "popupshowing innercontext", "popupshown innercontext" ],
   test: function () {
     synthesizeMouse($("outercontextmenu"), 4, 4, { type: "mousemove" });
-    synthesizeMouse($("outercontextmenu"), 2, 2, { type: "mousemove" });
+    setTimeout(function() {
+        synthesizeMouse($("outercontextmenu"), 2, 2, { type: "mousemove" });
+      }, 1000);
   },
   result: function (testname) {
     is($("outermain").triggerNode, $("popuparea"), testname + " outer");
     is($("innermain").triggerNode, $("popuparea"), testname + " inner");
     is($("outercontext").triggerNode, $("innermenu"), testname + " outer context");
     is($("innercontext").triggerNode, $("innermenu"), testname + " inner context");
     is(document.popupNode, $("innermenu"), testname + " document.popupNode");
   }