Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <body> | |
| 2 <script src="full-screen-test.js"></script> | |
| 3 <span id="span" width="300"></span> | |
| 4 <video id="video" width="300"></video> | |
| 5 <div>Tests for the disallowFullscreenForNonMediaElements setting which will be s et | |
| 6 in those platforms where fullscreen for non-media elements is not supported. | |
| 7 <script> | |
| 8 if (window.internals) { | |
| 9 window.internals.settings.setDisallowFullscreenForNonMediaElements(true) ; | |
| 10 | |
| 11 // 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
| |
| 12 if (Element.prototype.webkitRequestFullScreen == undefined) { | |
| 13 logResult(false, "Element.prototype.webkitRequestFullScreen == undef ined"); | |
| 14 endTest(); | |
| 15 } else { | |
| 16 // Fullscreen for non media elements is not supported. | |
| 17 waitForEventOnce(document, 'webkitfullscreenerror'); | |
| 18 runWithKeyDown(function(){document.getElementById('span').webkitRequ estFullScreen()}) | |
| 19 | |
| 20 // Fullscreen for media elements is supported, video in this case. | |
| 21 waitForEventAndEnd(document, 'webkitfullscreenchange'); | |
| 22 runWithKeyDown(function(){document.getElementById('video').webkitReq uestFullScreen()}); | |
|
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
| |
| 23 } | |
| 24 } | |
| 25 </script> | |
| 26 | |
| OLD | NEW |