tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

file_fullscreen-table.html (1373B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <meta charset="UTF-8">
      5  <title>Test for Bug 1223561</title>
      6  <script src="/tests/SimpleTest/EventUtils.js"></script>
      7  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      8  <script src="/tests/SimpleTest/WindowSnapshot.js"></script>
      9  <script type="text/javascript" src="file_fullscreen-utils.js"></script>
     10 </head>
     11 <body>
     12 <table style="background-color: green"></table>
     13 <script>
     14 "use strict";
     15 
     16 function ok(condition, msg) {
     17  opener.ok(condition, "[table] " + msg);
     18 }
     19 
     20 function is(a, b, msg) {
     21  opener.is(a, b, "[table] " + msg);
     22 }
     23 
     24 function info(msg) {
     25  opener.info("[table] " + msg);
     26 }
     27 
     28 const gTable = document.querySelector("table");
     29 
     30 function begin() {
     31  info("The default background of window should be white");
     32  addFullscreenChangeContinuation("enter", enteredFullscreen);
     33  assertWindowPureColor(window, "white");
     34  gTable.requestFullscreen();
     35 }
     36 
     37 function enteredFullscreen() {
     38  info("The table with green background should be in fullscreen");
     39  assertWindowPureColor(window, "green");
     40  gTable.style = "background: transparent";
     41  info("When the table becames transparent, the black backdrop should appear");
     42  assertWindowPureColor(window, "black");
     43  addFullscreenChangeContinuation("exit", exitedFullscreen);
     44  document.exitFullscreen();
     45 }
     46 
     47 function exitedFullscreen() {
     48  opener.nextTest();
     49 }
     50 </script>
     51 </body>
     52 </html>