https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 940c743ef143aa60d71f4c3236c24572d53ecc5d authored by Eric Willigers on 12 April 2018, 14:56:39 UTC
Update by testing Firefox nightly 61.01a
Tip revision: 940c743
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