summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/max-height-and-max-width.html
blob: 8d4828a50b4926e2623bc855451aae71ca814d51 (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
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head id="myhead">
<script src="../../resources/js-test.js"></script>
<script>
if (window.testRunner)
    window.testRunner.dumpAsText();

function doTest()
{
    description("This succeeds if max-height and max-width are not set together, but are different values.");

    var box = document.createElement("div");
    box.style['max-height'] = "20px";
    box.style['max-width'] = "30px";

    document.getElementById("body").appendChild(box);

    var style = window.getComputedStyle(box);
    if(style.getPropertyValue("max-height") == style.getPropertyValue("max-width"))
        testFailed("max-width is NOT independent of max-height.");
    else
        testPassed("max-width is independent of max-height.");
}
</script>
</head>
<body onload="doTest()" id="body">
</body>
</html>