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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-ready-check-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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Element ready check with allowfullscreen attribute</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script src="../trusted-click.js"></script>
6 <iframe src="http://{{domains[www1]}}:{{ports[http][0]}}/fullscreen/api/resource s/attempt-fullscreen.html" name="cross-origin-allowed" allowfullscreen></iframe>
7 <script>
8
9 async_test((t) => {
10 t.add_cleanup(() => document.exitFullscreen());
11
12 // When a message is received from a child frame, ensure that the report
13 // matches the expectations.
14 window.addEventListener('message', t.step_func(e => {
15 if (e.data.report && e.data.report.api == "fullscreen") {
16 assert_equals(e.data.report.result, true,
17 e.data.report.frame + " frame did enter fullscreen");
18 t.done();
19 }
20 }));
21
22 // Trigger the child frame to report as soon as its content is loaded.
23 var elem = document.querySelector('iframe');
24 elem.addEventListener('load', () => {
25 trusted_click(t, () => {
26 elem.contentWindow.postMessage({"action": "report"}, "*");
27 }, document.body);
28 });
29 });
30 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698