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..e5a262dcbe9a761046bb62ee435ee5c8db7eabb3 |
| --- /dev/null |
| +++ b/LayoutTests/fullscreen/full-screen-request-disallow-for-non-media-elements.html |
| @@ -0,0 +1,26 @@ |
| +<body> |
| +<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); |
| + |
| + // Bail out early if the full screen API is not enabled or is missing: |
|
philipj_slow
2014/07/30 12:11:18
Why this case? Neither setting hides the API, they
Ignacio Solla
2014/07/30 14:40:00
Removed. Don't need it (I made a copy from another
|
| + if (Element.prototype.webkitRequestFullScreen == undefined) { |
| + logResult(false, "Element.prototype.webkitRequestFullScreen == undefined"); |
| + endTest(); |
| + } else { |
| + // Fullscreen for non media elements is not supported. |
| + waitForEventOnce(document, 'webkitfullscreenerror'); |
| + runWithKeyDown(function(){document.getElementById('span').webkitRequestFullScreen()}) |
| + |
| + // Fullscreen for media elements is supported, video in this case. |
| + waitForEventAndEnd(document, 'webkitfullscreenchange'); |
| + runWithKeyDown(function(){document.getElementById('video').webkitRequestFullScreen()}); |
|
philipj_slow
2014/07/30 12:11:18
It would be best to only have one webkitRequestFul
Ignacio Solla
2014/07/30 14:40:00
I've changed it to only run the second step after
|
| + } |
| + } |
| +</script> |
| + |