test_focus_dialog.xhtml (922B)
1 <?xml version="1.0"?> 2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?> 3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?> 4 5 <window title="Focus Tests" 6 onload="setTimeout(runTest, 0);" 7 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 8 9 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> 10 11 <script> 12 if (navigator.platform.startsWith("Win")) { 13 SimpleTest.expectAssertions(0, 1); 14 } 15 16 SimpleTest.waitForExplicitFinish(); 17 async function runTest() { 18 // Enable full tab focus model on mac. 19 await SpecialPowers.pushPrefEnv({ set: [["accessibility.tabfocus", 7]] }); 20 window.openDialog("focus_dialog.xhtml", "_blank", "chrome,modal,noopener", window); 21 } 22 </script> 23 24 <body xmlns="http://www.w3.org/1999/xhtml"> 25 <p id="display"> 26 </p> 27 <div id="content" style="display: none"> 28 </div> 29 <pre id="test"> 30 </pre> 31 </body> 32 33 </window>