tor-browser

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

1758199-1.html (1504B)


      1 <html class="reftest-wait">
      2 <script>
      3 let pp;
      4 let documentElements = [];
      5 documentElements.push(document.documentElement);
      6 
      7 window.onload = () => {
      8  documentElements.push(document.documentElement);
      9 
     10  let o = document.getElementById('a')
     11  o.parentNode.appendChild(o)
     12  pp = SpecialPowers.wrap(self).printPreview();
     13  pp?.print()
     14  window.requestIdleCallback(() => {
     15    documentElements.push(document.documentElement);
     16 
     17    document.write('');
     18 
     19    setTimeout(finish, 100);
     20  });
     21 }
     22 
     23 function finish() {
     24 
     25  // The printPreview call above actually opens two print preview windows
     26  // because the <embed src='#'> below causes a second one to open. At least
     27  // we close the one window we can access, not sure if there is a way to get
     28  // ahold of the other window to close it. So this test leaves a window open
     29  // after it finishes.
     30  try { pp.close(); } catch (e) {}
     31 
     32  if (document.documentElement) {
     33    try { document.documentElement.className = ""; } catch (e) {}
     34  }
     35 
     36  // The documentElement that the reftest harness looks at to determine if the
     37  // test is done is not what document.documentElement points to when this code
     38  // is run. So we save all the document.documentElement's we encounter while
     39  // running this test and clear all of their class names.
     40  for (let de of documentElements) {
     41    if (de) {
     42      try {
     43        de.className = "";
     44      } catch (e) {}
     45    }
     46  }
     47 }
     48 </script>
     49 <style>
     50 :first-of-type { padding-block-start: 99% }
     51 </style>
     52 <mark id='a'>
     53 <embed src='#'>
     54 </html>