2 <title>Document.fullscreenElement
</title>
3 <script src=
"../../resources/testharness.js"></script>
4 <script src=
"../../resources/testharnessreport.js"></script>
5 <script src=
"../trusted-event.js"></script>
10 var div
= document
.querySelector("div");
12 document
.onfullscreenchange
= t
.step_func(function()
14 assert_equals(document
.fullscreenElement
, div
, "fullscreenElement before exitFullscreen()");
15 document
.exitFullscreen();
16 // FIXME: per spec fullscreenElement should still be div
17 assert_equals(document
.fullscreenElement
, null, "fullscreenElement after exitFullscreen()");
19 document
.onfullscreenchange
= t
.step_func(function()
21 assert_equals(document
.fullscreenElement
, null, "fullscreenElement after exiting fullscreen");
26 trusted_event(t
.step_func(function()
28 assert_equals(document
.fullscreenElement
, null, "fullscreenElement before requestFullscreen()");
29 div
.requestFullscreen();
30 // FIXME: per spec fullscreenElement should still be null
31 assert_equals(document
.fullscreenElement
, div
, "fullscreenElement after requestFullscreen()");