Upstream version 11.39.266.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fullscreen / full-screen-request-disallow-for-non-media-elements.html
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 set
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         var testStep2 = function() {
12             // Fullscreen for media elements is supported, video in this case.
13             waitForEventAndEnd(document, 'webkitfullscreenchange');
14             runWithKeyDown(function(){document.getElementById('video').webkitRequestFullScreen()});
15         };
16
17         // Fullscreen for non media elements is not supported.
18         waitForEventOnce(document, 'webkitfullscreenerror', testStep2);
19         runWithKeyDown(function(){document.getElementById('span').webkitRequestFullScreen()})
20     }
21 </script>
22 </body>