mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
Add support for fullscreen #10102
This commit is contained in:
parent
c3c086e521
commit
55f0e56224
33 changed files with 454 additions and 30 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue