tor-browser

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

devicePixelRatio-undisplayed-iframe.tentative.html (899B)


      1 <!doctype html>
      2 <link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-window-devicepixelratio">
      3 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1602347">
      4 <link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
      5 <link rel="author" href="https://mozilla.org" title="Mozilla">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <title>window.devicePixelRatio in an undisplayed iframe matches the dpi of the parent document</title>
      9 <div style="display: none">
     10  <iframe src="about:blank"></iframe>
     11 </div>
     12 <script>
     13 onload = function() {
     14  test(function() {
     15    let win = document.querySelector("iframe").contentWindow;
     16    assert_equals(win.devicePixelRatio, window.devicePixelRatio, "window.devicePixelRatio in an undisplayed iframe matches the dpi of the parent document");
     17  });
     18 };
     19 </script>