blob: 5b3f3f5d8aba556472461cad3861480e22516773 [file] [log] [blame]
<!DOCTYPE html>
<title>Fully exit fullscreen with two elements on stack</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../trusted-click.js"></script>
<script src="fully-exit-fullscreen.js"></script>
<div id="log"></div>
<div id="first">
<div id="last"></div>
</div>
<script>
async_test(function(t)
{
var first = document.getElementById("first");
trusted_request(t, first);
document.onfullscreenchange = t.step_func(function()
{
assert_equals(document.fullscreenElement, first);
var last = document.getElementById("last");
trusted_request(t, last);
document.onfullscreenchange = t.step_func(function()
{
assert_equals(document.fullscreenElement, last);
trusted_click(t, fully_exit_fullscreen.bind(null, document), last);
document.onfullscreenchange = t.step_func(function()
{
assert_equals(document.fullscreenElement, null);
t.done();
});
});
});
});
</script>