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

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

Issue 2585363002: Use FeaturePolicy to implement iframe[allowfullscreen] (Closed)
Patch Set: Avoid extra change event notification Created 3 years, 10 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 <title>Feature-Policy Fullscreen</title> 2 <title>Feature-Policy Fullscreen</title>
3 <div>Fullscreen</div> 3 <div>Fullscreen</div>
4 <script> 4 <script>
5 document.onwebkitfullscreenerror = function() { 5 document.onwebkitfullscreenerror = function() {
6 parent.postMessage({ type: 'error', enabled: document.webkitFullscreenEnabled }, '*'); 6 parent.postMessage({ type: 'error', enabled: document.webkitFullscreenEnabled }, '*');
7 }; 7 };
8 8
9 document.onwebkitfullscreenchange = function() { 9 document.onwebkitfullscreenchange = function() {
10 document.webkitExitFullscreen(); 10 if (document.webkitFullscreenElement) {
11 parent.postMessage({ type: 'change', enabled: document.webkitFullscreenEnabled }, '*'); 11 document.webkitExitFullscreen();
12 parent.postMessage({ type: 'change', enabled: document.webkitFullscreenEnabl ed }, '*');
13 }
12 }; 14 };
13 15
14 document.addEventListener('keypress', function() { 16 document.addEventListener('keypress', function() {
15 document.querySelector('div').webkitRequestFullscreen(); 17 document.querySelector('div').webkitRequestFullscreen();
16 }); 18 });
17 19
18 window.onload = function() { 20 window.onload = function() {
19 focus(); 21 focus();
20 eventSender.keyDown('a', []); 22 eventSender.keyDown('a', []);
21 } 23 }
22 </script> 24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698