Open Bug 744125 Opened 13 years ago Updated 2 years ago

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

Categories

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

x86
macOS
defect

Tracking

()

People

(Reporter: humph, Unassigned)

References

Details

(Whiteboard: [leave open])

Attachments

(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 http://mxr.mozilla.org/mozilla-central/source/content/html/content/test/test_fullscreen-api.html 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) { testWindow.close(); 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); }); return; } } runNextTest(); } function runNextTest() { if (gTestIndex < gTestWindows.length) { testWindow = window.open(gTestWindows[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); gTestIndex++; ... } 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
Attached patch disable on 10.8 (deleted) — Splinter Review
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
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 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.

Attachment

General

Created:
Updated:
Size: