summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fullscreen/model/remove-parent-manual.html
blob: 74327637ee958b5a481b4dc1c1d61dce7e47afcf (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
25
26
<!DOCTYPE html>
<title>Remove the parent of the fullscreen element</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../trusted-click.js"></script>
<div id="log"></div>
<div>
    <div id="child"></div>
</div>
<script>
async_test(function(t)
{
    var child = document.getElementById("child");
    trusted_request(child);
    document.onfullscreenchange = t.step_func(function()
    {
        assert_equals(document.fullscreenElement, child);
        child.parentNode.remove();
        document.onfullscreenchange = t.step_func(function()
        {
            assert_equals(document.fullscreenElement, null);
            t.done();
        });
    });
});
</script>