1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/pointerlock/file_pointerlockerror.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,41 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!--https://bugzilla.mozilla.org/show_bug.cgi?id=633602--> 1.7 +<head> 1.8 + <title>Bug 633602</title> 1.9 + <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"> 1.10 + </script> 1.11 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"> 1.12 + </script> 1.13 + <script type="application/javascript" src="pointerlock_utils.js"></script> 1.14 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.15 +</head> 1.16 +<body> 1.17 + <a target="_blank" 1.18 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=633602"> 1.19 + Mozilla Bug 633602 1.20 + </a> 1.21 + 1.22 + <pre id="test"> 1.23 + <script type="text/javascript"> 1.24 + /* 1.25 + * Test for Bug 633602 1.26 + * Make sure pointerlockerror event fires. 1.27 + */ 1.28 + 1.29 + SimpleTest.waitForExplicitFinish(); 1.30 + 1.31 + document.addEventListener("mozpointerlockerror", function (e) { 1.32 + ok(true, "pointerlockerror event should fire."); 1.33 + SimpleTest.finish(); 1.34 + }, false); 1.35 + 1.36 + function start() { 1.37 + // element not in the DOM, not fullscreen, should fail to lock 1.38 + div = document.createElement("div"); 1.39 + div.mozRequestPointerLock(); 1.40 + } 1.41 + </script> 1.42 + </pre> 1.43 +</body> 1.44 +</html>