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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-allowed-by-container-policy.html

Issue 2767983003: Initial Implementation of Iframe Attribute for Feature Policy (Part 4) (Closed)
Patch Set: Codereview: nit + added more unit tests for container policy Created 3 years, 8 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 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <iframe id="f1" allow="fullscreen"></iframe>
5 <iframe id="f2" allow="fullscreen" allowfullscreen></iframe>
6 <script>
7 var srcs = [
8 "resources/feature-policy-fullscreen.html",
9 "http://localhost:8000/feature-policy/resources/feature-policy-fullscreen.html "
10 ];
11 var f1 = document.getElementById('f1');
12 var f2 = document.getElementById('f2');
13
14 function loadFrames(iframe) {
15 for (var src of srcs) {
16 promise_test(function(t) {
17 iframe.src = src;
18 return new Promise(function(resolve, reject) {
19 window.addEventListener('message', function(e) {
20 resolve(e.data);
21 }, { once: true });
22 }).then(function(data) {
23 assert_true(data.enabled, 'Document.fullscreenEnabled:');
24 assert_equals(data.type, 'change', 'Document.requestFullscreen():');
25 });
26 }, 'Fullscreen is allowed on URL: ' + src + ' with allowfullscreen = ' + ifr ame.allowFullscreen);
27 }
28 }
29
30 loadFrames(f1);
31 loadFrames(f2);
32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698