tor-browser

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

test_meta_viewport8.html (938B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>meta viewport test</title>
      6  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      7  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
      8  <meta name="viewport" content="initial-scale=0.01">
      9  <script src="viewport_helpers.js"></script>
     10 </head>
     11 <body>
     12  <p>minimum-scale=0.01</p>
     13  <script type="application/javascript">
     14    "use strict";
     15 
     16    add_task(async function test1() {
     17      await SpecialPowers.pushPrefEnv(scaleRatio(1.0));
     18 
     19      let info = getViewportInfo(800, 480);
     20      is(info.minZoom,     0.25,    "minimum scale defaults to the absolute minimum");
     21      is(info.defaultZoom, 0.25,    "initial scale is bounded by the minimum scale");
     22      is(info.width,       3200,    "width is scaled correctly by zoom level");
     23      is(info.height,      1920,    "height is scaled correctly by zoom level");
     24    });
     25  </script>
     26 </body>
     27 </html>