tor-browser

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

1676172-1.html (1463B)


      1 <html class="reftest-wait">
      2 <head>
      3 <script>
      4 function setup() {
      5 setTimeout(finish, 1500);
      6 }
      7 function finish() {
      8 window.stop();
      9 document.documentElement.className = "";
     10 }
     11 </script>
     12 <style>
     13 iframe {
     14 	width: 100px;
     15 	height: 100px;
     16 }
     17 </style>
     18 </head>
     19 <body onload="setup();">
     20 <script>
     21 let numiframes = 30;
     22 
     23 const Cc = SpecialPowers.Cc;
     24 const Ci = SpecialPowers.Ci;
     25 let isDebugBuild =
     26  Cc["@mozilla.org/xpcom/debug;1"].getService(Ci.nsIDebug2).isDebugBuild;
     27 let isMac =
     28  navigator.appVersion.toLowerCase().includes("mac") ||
     29  navigator.platform.toLowerCase().includes("mac");
     30 
     31 // On some platforms too many animating and reloading gifs means we don't ever
     32 // get enough time to serve paints so that there is never a period of time
     33 // where there are no paints pending, so the reftest harness can't end the
     34 // test. So we limit the number on those platforms, since we only need one
     35 // iframe to reproduce the bug this is okay, more iframes just give more
     36 // chance of reproducing it on any given run.
     37 if (navigator.appVersion.includes("Windows")) {
     38 numiframes = 16;
     39 }
     40 if (navigator.platform.includes("Linux")) {
     41 numiframes = 10;
     42 }
     43 if (navigator.appVersion.includes("Android")) {
     44 numiframes = 2;
     45 }
     46 if (isMac && isDebugBuild) {
     47 numiframes = 20;
     48 }
     49 for (let i = 0; i < numiframes; i++) {
     50 let ifr = document.createElement("iframe");
     51 document.body.appendChild(ifr)
     52 ifr.src = "1676172-1-iframe.html?" + i;
     53 }
     54 setTimeout(finish, 1500);
     55 </script>
     56 </body>
     57 </html>