file_fullscreen-resize.html (1203B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=1742421 5 --> 6 <head> 7 <title>Test for Bug 1742421</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <script src="file_fullscreen-utils.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 11 </head> 12 <body style="background-color: gray;"> 13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1742421">Mozilla Bug 1742421</a> 14 <p id="display"></p> 15 <div id="content" style="display: none"></div> 16 <pre id="test"> 17 <script type="application/javascript"> 18 19 /** Test for Bug 1742421 */ 20 21 function begin() 22 { 23 addFullscreenChangeContinuation("enter", () => { 24 opener.info("[resize] Entered fullscreen"); 25 // Do not use addFullscreenChangeContinuation for fullscreen exit given that 26 // it expects the window will be restored to the original size. 27 document.addEventListener("fullscreenchange", () => { 28 opener.ok(!document.fullscreenElement, "[resize] Should have left full-screen due to resize"); 29 opener.nextTest(); 30 }, { once: true }); 31 window.resizeBy(100,100); 32 }); 33 document.body.requestFullscreen(); 34 } 35 36 </script> 37 </pre> 38 </body> 39 </html>