4 https://bugzilla.mozilla.org/show_bug.cgi?id=391221
7 <title>Test for Bug
391221</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=391221">Mozilla Bug
391221</a>
14 <div id=
"width-ref" style=
"width: 2ch"></div>
18 <div id=
"one" style=
"width: 1000px; max-width: 2ch"></div>
19 <div id=
"two" style=
"width: 0px; min-width: 2ch"></div>
20 <div id=
"three" style=
"width: 1000ch; max-width: 2px"></div>
24 <script class=
"testbody" type=
"text/javascript">
26 /** Test for Bug
391221 **/
27 function getComp(id) {
28 return document.defaultView.getComputedStyle($(id));
31 is(getComp(
"one").width, getComp(
"width-ref").width,
32 "max-width in ch units not working?");
34 is(getComp(
"two").width, getComp(
"width-ref").width,
35 "min-width in ch units not working?");
37 is(getComp(
"three").width,
"2px",
"max-width not applied to width in chars?");