4 https://bugzilla.mozilla.org/show_bug.cgi?id=391221
7 <title>Test for Bug
391221</title>
8 <script type=
"text/javascript" src=
"/MochiKit/MochiKit.js"></script>
9 <script type=
"text/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=391221">Mozilla Bug
391221</a>
15 <div id=
"width-ref" style=
"width: 2ch"></div>
17 <div id=
"content" style=
"display: none">
19 <div id=
"one" style=
"width: 1000px; max-width: 2ch"></div>
20 <div id=
"two" style=
"width: 0px; min-width: 2ch"></div>
21 <div id=
"three" style=
"width: 1000ch; max-width: 2px"></div>
25 <script class=
"testbody" type=
"text/javascript">
27 /** Test for Bug
391221 **/
28 function getComp(id) {
29 return document.defaultView.getComputedStyle($(id),
"");
32 is(getComp(
"one").width, getComp(
"width-ref").width,
33 "max-width in ch units not working?");
35 is(getComp(
"two").width, getComp(
"width-ref").width,
36 "min-width in ch units not working?");
38 is(getComp(
"three").width,
"2px",
"max-width not applied to width in chars?");