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

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

Issue 2855133004: Re-enable feature policy layout tests after bug fix. (Closed)
Patch Set: Updated fp-vibrate tests expect Created 3 years, 6 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <iframe id="f1" allow="fullscreen"></iframe> 4 <script src="resources/helper.js"></script>
5 <iframe id="f2" allow="fullscreen" allowfullscreen></iframe> 5 <iframe allow="fullscreen"></iframe>
6 <iframe allow="fullscreen" allowfullscreen></iframe>
6 <script> 7 <script>
7 var srcs = [ 8 var srcs = [
8 "resources/feature-policy-fullscreen.html", 9 "resources/feature-policy-fullscreen.html",
9 "http://localhost:8000/feature-policy/resources/feature-policy-fullscreen.html " 10 "http://localhost:8000/feature-policy/resources/feature-policy-fullscreen.html "
10 ]; 11 ];
11 var f1 = document.getElementById('f1');
12 var f2 = document.getElementById('f2');
13 12
14 function loadFrames(iframe) { 13 function loadFrame(iframe, src) {
15 for (var src of srcs) { 14 var allowFullscreen = iframe.allowFullscreen;
16 promise_test(function(t) { 15 promise_test(function() {
17 iframe.src = src; 16 iframe.src = src;
18 return new Promise(function(resolve, reject) { 17 return new Promise(function(resolve, reject) {
19 window.addEventListener('message', function(e) { 18 window.addEventListener('message', function(e) {
20 resolve(e.data); 19 resolve(e.data);
21 }, { once: true }); 20 }, { once: true });
22 }).then(function(data) { 21 }).then(function(data) {
23 assert_true(data.enabled, 'Document.fullscreenEnabled:'); 22 assert_true(data.enabled, 'Document.fullscreenEnabled:');
24 assert_equals(data.type, 'change', 'Document.requestFullscreen():'); 23 assert_equals(data.type, 'change', 'Document.requestFullscreen():');
25 }); 24 });
26 }, 'Fullscreen is allowed on URL: ' + src + ' with allowfullscreen = ' + ifr ame.allowFullscreen); 25 }, 'Fullscreen is allowed on URL: ' + src + ' with allowfullscreen = ' +
27 } 26 allowFullscreen);
28 } 27 }
29 28
30 loadFrames(f1); 29 window.onload = function() {
31 loadFrames(f2); 30 loadIframes(srcs);
31 }
32 </script> 32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698