| Index: third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-ready-check-not-allowed-cross-origin-manual.sub.html
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-ready-check-not-allowed-cross-origin-manual.sub.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-ready-check-not-allowed-cross-origin-manual.sub.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8aabe97ba14cb2c77a95f5901b02eac8d7e5411b
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-ready-check-not-allowed-cross-origin-manual.sub.html
|
| @@ -0,0 +1,31 @@
|
| +<!DOCTYPE html>
|
| +<title>Element ready check with no allowfullscreen attribute</title>
|
| +<script src="/resources/testharness.js"></script>
|
| +<script src="/resources/testharnessreport.js"></script>
|
| +<script src="../trusted-click.js"></script>
|
| +<iframe src="http://{{domains[www1]}}:{{ports[http][0]}}/fullscreen/api/resources/attempt-fullscreen.html" name="cross-origin-default"></iframe>
|
| +<script>
|
| +
|
| +async_test((t) => {
|
| + document.onfullscreenchange = t.unreached_func("document fullscreenchange event");
|
| + document.onfullscreenerror = t.unreached_func("document fullscreenerror event");
|
| +
|
| + // When a message is received from a child frame, ensure that the report
|
| + // matches the expectations.
|
| + window.addEventListener('message', t.step_func(e => {
|
| + if (e.data.report && e.data.report.api == "fullscreen") {
|
| + assert_equals(e.data.report.result, false,
|
| + e.data.report.frame + " frame did enter fullscreen");
|
| + t.done();
|
| + }
|
| + }));
|
| +
|
| + // Trigger the child frame to report as soon as its content is loaded.
|
| + var elem = document.querySelector('iframe');
|
| + elem.addEventListener('load', () => {
|
| + trusted_click(t, () => {
|
| + elem.contentWindow.postMessage({"action": "report"}, "*");
|
| + }, document.body);
|
| + });
|
| +});
|
| +</script>
|
|
|