https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 3e97222a89de5d7094b14bae8c9f469e28c6836b authored by James Graham on 11 April 2018, 18:02:33 UTC
Stop running tests on pypy
Tip revision: 3e97222
viewport-type.html
<!doctype html>
<html>
    <head>
        <title>Viewport: window.visualViewport type</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width">
        <script src="/resources/testharness.js"></script>
        <script src="/resources/testharnessreport.js"></script>
    </head>
    <body>
    <h1>Viewport: window.visualViewport type</h1>
    <h4>Test Description: This test checks that window.visualViewport is an object of type VisualViewport.</h4>
    <script>
        test(function() {
              assert_equals(typeof(window.visualViewport), "object");
            }, "window.visualViewport is an object");

        test(function() {
              assert_equals(window.visualViewport.toString(), "[object VisualViewport]");
            }, "window.visualViewport has type `VisualViewport`");

        addEventListener("load", function() {
            document.getElementById("viewtype-log").innerText = typeof(window.visualViewport);
        });
    </script>
    <div id="complete-notice">
        <p>window.visualViewport is of type: <span id="viewtype-log"></span>.</p>
    </div>
    <div id="log"></div>
    </body>
</html>
back to top