https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 28c8debd4209bd796cc84032359b566eac9a6838 authored by Darren Shen on 11 April 2018, 06:04:13 UTC
[css-typed-om] Support remaining text properties.
Tip revision: 28c8deb
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