Add support for fullscreen #10102

This commit is contained in:
Jansen Jan 2016-12-08 14:02:08 +01:00
parent c3c086e521
commit 55f0e56224
33 changed files with 454 additions and 30 deletions

View file

@ -3,15 +3,23 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe></iframe>
<iframe allowfullscreen></iframe>
<iframe src="blank.html"></iframe>
<iframe allowfullscreen src="blank.html"></iframe>
<script>
test(function()
async_test(function(t)
{
assert_true(document.fullscreenEnabled, "top-level document");
var iframes = document.getElementsByTagName("iframe");
assert_false(iframes[0].contentDocument.fullscreenEnabled, "iframe without allowfullscreen");
assert_true(iframes[1].contentDocument.fullscreenEnabled, "iframe with allowfullscreen");
var loaded = 0;
iframes[0].onload = t.step_func(function() {
assert_false(iframes[0].contentDocument.fullscreenEnabled, "iframe without allowfullscreen");
if (++loaded == 2) t.done();
});
iframes[1].onload = t.step_func(function() {
assert_true(iframes[1].contentDocument.fullscreenEnabled, "iframe with allowfullscreen");
if (++loaded == 2) t.done();
});
});
</script>