Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-fullscreen.html |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-fullscreen.html b/third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-fullscreen.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1e03eddf9c7871ef92433ea608d74613d10ef3ce |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-fullscreen.html |
| @@ -0,0 +1,24 @@ |
| +<!DOCTYPE html> |
| +<head> |
|
foolip
2016/12/02 10:52:09
head can be omitted
lunalu1
2016/12/02 19:22:06
Done.
|
| + <title>Feature-Policy Fullscreen Disabled</title> |
| +</head> |
| +<div>Fullscreen</div> |
| +<script> |
| +document.onwebkitfullscreenerror = function() { |
| + parent.postMessage({ type: 'error', enabled: document.webkitFullscreenEnabled }, '*'); |
| +}; |
| + |
| +document.onwebkitfullscreenchange = function() { |
| + document.webkitExitFullscreen(); |
| + parent.postMessage({ type: 'change', enabled: document.webkitFullscreenEnabled }, '*'); |
| +}; |
| + |
| +document.addEventListener('keypress', function() { |
| + document.querySelector('div').webkitRequestFullscreen(); |
| +}, { once: true }); |
|
foolip
2016/12/02 10:52:09
{ once: true } is harmless here, but also not need
lunalu1
2016/12/02 19:22:06
Done.
|
| + |
| +window.onload = function() { |
| + focus(); |
| + eventSender.keyDown('a', []); |
| +} |
| +</script> |