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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-fullscreen-enabled-cross-origin.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>Document#fullscreenEnabled</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <div id="log"></div>
6 <iframe src="resources/report-fullscreen-enabled.html" name="same-origin-default "></iframe>
7 <iframe src="resources/report-fullscreen-enabled.html" allowfullscreen name="sam e-origin-allow"></iframe>
8 <iframe src="http://{{domains[www1]}}:{{ports[http][0]}}/fullscreen/api/resource s/report-fullscreen-enabled.html" name="cross-origin-default"></iframe>
9 <iframe src="http://{{domains[www1]}}:{{ports[http][0]}}/fullscreen/api/resource s/report-fullscreen-enabled.html" allowfullscreen name="cross-origin-allow"></if rame>
10 <script>
11 var expectations = {
12 "same-origin-default": false,
13 "same-origin-allow": true,
14 "cross-origin-default": false,
15 "cross-origin-allow": true
16 };
17
18 var tests = {};
19 for (var name in expectations) {
20 tests[name] = async_test( 'Fullscreen enabled test: ' + name);
21 }
22
23 // When a message is received from a child frame, ensure that the report
24 // matches the expectations.
25 window.addEventListener('message', e => {
26 if (e.data.report && e.data.report.api == "fullscreen") {
27 if (e.data.report.frame in expectations) {
28 tests[e.data.report.frame].step(() => {
29 assert_equals(e.data.report.enabled, expectations[e.data.report.frame],
30 e.data.report.frame + " frame fullscreenEnabled");
31 });
32 delete expectations[e.data.report.frame];
33 tests[e.data.report.frame].done();
34 }
35 }
36 });
37 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698