Open Bug 744125 Opened 12 years ago Updated 1 year ago

Fix and enable Pointer Lock mochitests on OS X Lion and Mountain Lion


(Core :: DOM: Events, defect, P5)





(Reporter: humph, Unassigned)



(Whiteboard: [leave open])


(1 file)

Spin-off from bug 633602 comment 132.  The Pointer Lock tests are problematic on OS X Lion, due to the fact that they depend on the Fullscreen API, which in turn requires some waitForFocus() and setTimeout gymnastics for mochitests.

Using the pattern established in hasn't seemed to have worked:

const isWinXP = navigator.userAgent.indexOf("Windows NT 5.1") != -1;
const isOSXLion = navigator.userAgent.indexOf("Mac OS X 10.7") != -1;
function nextTest() {
  if (testWindow) {
    if (isOSXLion) {
      // On OS X Lion, tests cause problems. Timeouts are a bad way to get around
      // the problem and may lead to future [orange], but they are the only option
      // at this point.
      SimpleTest.waitForFocus(function() { setTimeout(runNextTest, 3000); });

function runNextTest() {
  if (gTestIndex < gTestWindows.length) {
    testWindow =[gTestIndex], "", "width=500,height=500");
    // We'll wait for the window to load, then make sure our window is refocused
    // before starting the test, which will get kicked off on "focus".
    // This ensures that we're essentially back on the primary "desktop" on
    // OS X Lion before we run the test.
    testWindow.addEventListener("load", function onload() {
      testWindow.removeEventListener("load", onload, false);
      SimpleTest.waitForFocus(function() {
        SimpleTest.waitForFocus(testWindow.begin, testWindow);
    }, false);

I did variations on this in order to try and get Pointer Lock to work, but to no avail.  I also found that I was more likely to randomly fail on Linux with this pattern in place.

In order to get the Pointer Lock API landed, the tests have been todo()'ed on Lion, and should get enabled when we can track down the source of the failures.
Summary: Fix and enable Pointer Lock mohcitests on OS X Lion → Fix and enable Pointer Lock mochitests on OS X Lion
We'll need to disable it on 10.8 as well - once you get rid of enough other things hanging before it runs, on 10.8 debug it hits objc assertions a la bug 741304.
Blocks: 786084
Summary: Fix and enable Pointer Lock mochitests on OS X Lion → Fix and enable Pointer Lock mochitests on OS X Lion and Mountain Lion
Depends on: 1051791

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.