Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-ready-check-not-allowed-cross-origin-manual.sub.html

Issue 2898503002: Reenable feature policy control over fullscreen (Closed)
Patch Set: Fixing last test nits Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698