mirror of
https://github.com/servo/servo.git
synced 2025-07-11 17:33:47 +01:00
25 lines
1.1 KiB
HTML
25 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<title>Element ready check for containing iframe</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="../trusted-click.js"></script>
|
|
<div id="log"></div>
|
|
<iframe allowfullscreen></iframe>
|
|
<iframe allowfullscreen></iframe>
|
|
<script>
|
|
// wait for load event to avoid https://bugzil.la/1493878
|
|
window.onload = function() {
|
|
async_test(function(t) {
|
|
var iframes = document.getElementsByTagName("iframe");
|
|
trusted_request(t, iframes[0].contentDocument.body, document.body);
|
|
iframes[0].contentDocument.onfullscreenchange = t.step_func(function() {
|
|
assert_equals(document.fullscreenElement, iframes[0]);
|
|
trusted_request(t, iframes[1].contentDocument.body, iframes[0].contentDocument.body);
|
|
iframes[1].contentDocument.onfullscreenchange = t.step_func_done(function() {
|
|
assert_equals(document.fullscreenElement, iframes[1]);
|
|
});
|
|
iframes[1].contentDocument.onfullscreenerror = t.unreached_func("fullscreenchange error");
|
|
});
|
|
});
|
|
};
|
|
</script>
|