test_windowed.xhtml (934B)
1 <?xml version="1.0"?> 2 3 <window title="Top-level window keyhandling tests" 4 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 5 onload="test();"> 6 7 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> 8 9 <script type="application/javascript"> 10 <![CDATA[ 11 SimpleTest.waitForExplicitFinish(); 12 13 async function run_test(path) { 14 let win = window.browsingContext.topChromeWindow 15 .openDialog(path, "_blank", "width=500,height=500", window); 16 await SimpleTest.promiseFocus(win); 17 await win.startTest(); 18 } 19 20 async function test() { 21 await run_test("test_input.html"); 22 await run_test("test_textarea.html"); 23 SimpleTest.finish(); 24 } 25 ]]> 26 </script> 27 28 <body xmlns="http://www.w3.org/1999/xhtml"> 29 <p id="display"></p> 30 <div id="content" style="display:none;"></div> 31 <pre id="test"></pre> 32 </body> 33 </window>