Bug 458861. Validate TrueType headers before activating downloaded font. r=roc, sr...
[wine-gecko.git] / layout / style / test / test_bug391221.html
blobf3a34bb3a92bed9e8f27e51eedbce8f11a3a8aaf
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 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" />
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=391221">Mozilla Bug 391221</a>
14 <p id="display">
15 <div id="width-ref" style="width: 2ch"></div>
16 </p>
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>
23 </div>
24 <pre id="test">
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?");
40 </script>
41 </pre>
42 </body>
43 </html>