tor-browser

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

viewport-unscaled-scale-iframe.html (1140B)


      1 <!doctype html>
      2 <html>
      3    <head>
      4        <title>Viewport: Unscaled scale iframe</title>
      5        <meta charset="utf-8">
      6        <meta name="viewport" content="width=device-width">
      7        <script src="/resources/testharness.js"></script>
      8        <script src="/resources/testharnessreport.js"></script>
      9        <script src="viewport_support.js"></script>
     10        <style>
     11            iframe {
     12              width: 200px;
     13              height: 300px;
     14            }
     15        </style>
     16    </head>
     17    <body>
     18    <h1>Viewport: Unscaled scale iframe</h1>
     19    <h4>Test Description: This test checks that the default value for scale inside an iframe is 1.</h4>
     20    <iframe></iframe>
     21    <div id="complete-notice">
     22        <p>iframe's window.visualViewport.scale is <span id="view-scale-log"></span>.</p>
     23    </div>
     24    <div id="log"></div>
     25    </body>
     26    <script>
     27        test(function() {
     28              assert_equals(frames[0].window.visualViewport.scale, 1);
     29            }, "iframe's visualViewport.scale default value.");
     30 
     31        document.getElementById("view-scale-log").innerText = frames[0].window.visualViewport.scale;
     32    </script>
     33 </html>