[email protected] | bc6619f | 2014-07-01 23:44:06 | [diff] [blame] | 1 | <!DOCTYPE html> |
Mustaq Ahmed | fdd52df | 2017-11-23 15:43:24 | [diff] [blame] | 2 | <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=90327">bug 90327</a>: |
[email protected] | 5b089802 | 2012-07-06 21:40:59 | [diff] [blame] | 3 | webkitCancelFullScreen for iframes</p> |
| 4 | <p>To test manually, click the "Go full screen" button - the page should enter full screen mode and immediately exit again, without crashing.</p> |
| 5 | <script src="full-screen-test.js"></script> |
| 6 | <script> |
| 7 | function runTest() { |
| 8 | var frame = document.getElementById('frame'); |
| 9 | |
| 10 | waitForEventOnce(frame.contentDocument, 'webkitfullscreenchange', function() { |
| 11 | test("document.getElementById('frame').contentDocument.webkitIsFullScreen==true") |
| 12 | waitForEventOnce(frame.contentDocument, 'webkitfullscreenchange', function() { |
| 13 | test("document.getElementById('frame').contentDocument.webkitIsFullScreen==false") |
| 14 | endTest(); |
| 15 | }); |
| 16 | |
| 17 | document.webkitCancelFullScreen(); |
| 18 | }); |
| 19 | |
Mustaq Ahmed | fdd52df | 2017-11-23 15:43:24 | [diff] [blame] | 20 | var x = frame.getBoundingClientRect().left + 10; |
| 21 | var y = frame.getBoundingClientRect().top + 10; |
| 22 | eventSender.mouseMoveTo(x, y); |
| 23 | eventSender.mouseDown(); |
| 24 | eventSender.mouseUp(); |
[email protected] | 5b089802 | 2012-07-06 21:40:59 | [diff] [blame] | 25 | } |
| 26 | </script> |
[email protected] | bc6619f | 2014-07-01 23:44:06 | [diff] [blame] | 27 | <iframe id="frame" src="resources/inner.html" width="300" height="100" onload="runTest()" allowfullscreen> |
[email protected] | 5b089802 | 2012-07-06 21:40:59 | [diff] [blame] | 28 | </iframe> |