Bug 1839315: part 4) Link from `SheetLoadData::mWasAlternate` to spec. r=emilio DONTBUILD
[gecko.git] / layout / style / test / test_bug391221.html
blobbf787111971adca677c6856a36674780b687c21a
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=391221
5 -->
6 <head>
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" />
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=391221">Mozilla Bug 391221</a>
13 <p id="display">
14 <div id="width-ref" style="width: 2ch"></div>
15 </p>
16 <div id="content">
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>
22 </div>
23 <pre id="test">
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?");
39 </script>
40 </pre>
41 </body>
42 </html>