summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fullscreen/api/document-exit-fullscreen-manual.html
blob: 3b0d283978aec0d79c64f3c32c5183f56ddedffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<title>Document.exitFullscreen()</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../trusted-click.js"></script>
<div id="log"></div>
<script>
async_test(function(t)
{
    trusted_request(document.querySelector("div"));

    document.addEventListener("fullscreenchange", t.step_func(function()
    {
        if (document.fullscreenElement) {
            document.exitFullscreen();
        } else {
            assert_equals(event.target, document, "event.target");
            assert_false(event.bubbles, "event.bubbles");
            assert_false(event.cancelable, "event.cancelable");
            t.done();
        }
    }));
});
</script>