| <!DOCTYPE html> |
| <script src="full-screen-test.js"></script> |
| <title>User-agent style sheet for iframe width/height</title> |
| <style> |
| iframe { |
| min-width: 50% !important; |
| max-width: 50% !important; |
| min-height: 50% !important; |
| max-height: 50% !important; |
| width: 50% !important; |
| height: 50% !important; |
| } |
| </style> |
| <iframe></iframe> |
| <script> |
| iframe = document.querySelector('iframe'); |
| |
| waitForEventAndEnd(document, 'webkitfullscreenchange', function() |
| { |
| computedStyle = getComputedStyle(iframe); |
| testExpected('computedStyle.minWidth', '0px'); |
| testExpected('computedStyle.maxWidth', 'none'); |
| testExpected('computedStyle.minHeight', '0px'); |
| testExpected('computedStyle.maxHeight', 'none'); |
| testExpected('computedStyle.width', window.innerWidth + 'px'); |
| testExpected('computedStyle.height', window.innerHeight + 'px'); |
| }); |
| |
| runWithKeyDown(function() |
| { |
| iframe.webkitRequestFullscreen(); |
| }); |
| </script> |