Chromium Code Reviews| Index: LayoutTests/fullscreen/full-screen-request-disallow-for-non-media-elements.html |
| diff --git a/LayoutTests/fullscreen/full-screen-request-disallow-for-non-media-elements.html b/LayoutTests/fullscreen/full-screen-request-disallow-for-non-media-elements.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..07effa4e39350cf5c76022782f292f0dd8acb739 |
| --- /dev/null |
| +++ b/LayoutTests/fullscreen/full-screen-request-disallow-for-non-media-elements.html |
| @@ -0,0 +1,22 @@ |
| +<body> |
|
falken
2014/07/31 14:53:10
<body> is usually omitted in layout tests. If some
Ignacio Solla
2014/08/01 10:02:44
Done.
|
| +<script src="full-screen-test.js"></script> |
| +<span id="span" width="300"></span> |
| +<video id="video" width="300"></video> |
| +<div>Tests for the disallowFullscreenForNonMediaElements setting which will be set |
| +in those platforms where fullscreen for non-media elements is not supported. |
| +<script> |
| + if (window.internals) { |
| + window.internals.settings.setDisallowFullscreenForNonMediaElements(true); |
| + |
| + var testStep2 = function() { |
| + // Fullscreen for media elements is supported, video in this case. |
| + waitForEventAndEnd(document, 'webkitfullscreenchange'); |
| + runWithKeyDown(function(){document.getElementById('video').webkitRequestFullScreen()}); |
| + }; |
| + |
| + // Fullscreen for non media elements is not supported. |
| + waitForEventOnce(document, 'webkitfullscreenerror', testStep2); |
| + runWithKeyDown(function(){document.getElementById('span').webkitRequestFullScreen()}) |
| + } |
| +</script> |
| + |