Bug 1174323 - Relieve intermittent failure of the screenClientXYConst test in pointerlock tests. rs=KWierso
authorXidorn Quan <quanxunzhen@gmail.com>
Wed, 17 Jun 2015 15:43:13 +1000
changeset 249313 d09603b88a08cfd2c169151e5f87707614593955
parent 249312 b857e7a2ab265aa623df42e9d6ec24c9858c8324
child 249314 d34e33ab92f177e1b1a41b7752fc1f6b4db0c0d9
push id28923
push userryanvm@gmail.com
push dateWed, 17 Jun 2015 18:57:11 +0000
treeherdermozilla-central@099d6cd6725e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersKWierso
bugs1174323
milestone41.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 1174323 - Relieve intermittent failure of the screenClientXYConst test in pointerlock tests. rs=KWierso
dom/tests/mochitest/pointerlock/file_screenClientXYConst.html
--- a/dom/tests/mochitest/pointerlock/file_screenClientXYConst.html
+++ b/dom/tests/mochitest/pointerlock/file_screenClientXYConst.html
@@ -99,18 +99,21 @@ https://bugzilla.mozilla.org/show_bug.cg
         if (document.mozFullScreenElement === div) {
           if (screenX != 0 || screenY != 0) {
             todo(screenX == 0 && screenY == 0,
               "We should only receive fullscreenchange once we've finished fullscreen transition " +
               "window.screenX=" + screenX + " window.screenY=" + screenY);
             setTimeout(fullscreenchange, 250);
             return;
           }
-          div.addEventListener("mousemove", moveUnlocked, false);
-          synthesizeMouseAtCenter(div, { type: "mousemove" }, window);
+          // Synthesize mouse event asynchronously
+          SimpleTest.executeSoon(function () {
+            div.addEventListener("mousemove", moveUnlocked, false);
+            synthesizeMouseAtCenter(div, { type: "mousemove" }, window);
+          }, 0);
         } else {
           runTests();
           SimpleTest.finish();
         }
       }
       document.addEventListener("mozfullscreenchange", fullscreenchange, false);
 
       function start() {