Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-iframe.html |
| diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-iframe.html b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-iframe.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3edb7c8aec7b057bf891f5c6642d962667e5ea30 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-iframe.html |
| @@ -0,0 +1,28 @@ |
| +<!DOCTYPE html> |
| +<title>Element#requestFullscreen() in iframe followed by removing the iframe</title> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script src="../trusted-click.js"></script> |
| +<div id="log"></div> |
|
mlamouri (slow - plz ping)
2016/12/06 12:15:47
What's this for?
foolip
2016/12/06 14:03:59
testharness.js automatically adds a <div id="log">
|
| +<iframe allowfullscreen></iframe> |
| +<script> |
| +// Adapted from https://github.com/w3c/web-platform-tests/pull/4250 |
| +// TODO(foolip): Remove this test when the above is imported and passing. |
| +async_test(t => { |
| + const iframe = document.querySelector("iframe"); |
| + const iframeDocument = iframe.contentDocument; |
| + |
| + document.onfullscreenchange = t.step_func_done(() => { |
| + assert_equals(document.fullscreenElement, null); |
| + assert_equals(iframeDocument.fullscreenElement, null); |
| + }); |
| + document.onfullscreenerror = t.unreached_func("fullscreenerror event"); |
| + iframeDocument.onfullscreenchange = t.unreached_func("iframe fullscreenchange event"); |
| + iframeDocument.onfullscreenerror = t.unreached_func("iframe fullscreenerror event"); |
| + |
| + trusted_click(t.step_func(() => { |
| + iframeDocument.body.requestFullscreen(); |
| + iframe.remove(); |
| + }), document.body); |
| +}); |
| +</script> |