summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fullscreen/full-screen-min-max-width-height-video.html
blob: ac80ee460686aaaf9dbb069973eb190ab91778cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<script src="full-screen-test.js"></script>
<title>User-agent style sheet for video width/height</title>
<style>
video {
    min-width: 50% !important;
    max-width: 50% !important;
    min-height: 50% !important;
    max-height: 50% !important;
    width: 50% !important;
    height: 50% !important;
}
</style>
<video></video>
<script>
video = document.querySelector('video');

waitForEventAndEnd(document, 'webkitfullscreenchange', function()
{
    computedStyle = getComputedStyle(video);
    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()
{
    video.webkitRequestFullscreen();
});
</script>