Bug 458861. Validate TrueType headers before activating downloaded font. r=roc, sr...
[wine-gecko.git] / layout / style / test / test_bug412901.html
blob2c3fead9914042fad982d08bb88ec086ae1c635e
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=412901
5 -->
6 <head>
7 <title>Test for Bug 412901</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=412901">Mozilla Bug 412901</a>
14 <div id="testDiv" style="width:20px; height:20px; border:solid silver; border-left-width:0.2px; border-right-width:0px; border-top-width:2.3px; border-bottom-width:5.5px;">
15 <div id="testDiv2" style="width:20px; height:20px; border:hidden solid silver; border-left-width:0.2px; border-right-width:0px; border-top-width:2.3px; border-bottom-width:5.5px;">
16 <p id="display"></p>
17 </div>
18 <div id="content" style="display: none">
20 </div>
21 <pre id="test">
22 <script class="testbody" type="text/javascript">
24 /** Test for Bug 412901 **/
26 var div = document.getElementById("testDiv");
27 var computedStyle = document.defaultView.getComputedStyle(div, "");
28 // we never round down to 0px, very small widths are rounded up to 1px
29 is(computedStyle.borderLeftWidth, "1px");
30 is(computedStyle.borderRightWidth, "0px");
31 is(computedStyle.borderTopWidth, "2px");
32 is(computedStyle.borderBottomWidth, "5px");
34 var div2 = document.getElementById("testDiv2");
35 var computedStyle2 = document.defaultView.getComputedStyle(div2, "");
36 is(computedStyle2.borderLeftWidth, "0px");
37 is(computedStyle2.borderRightWidth, "0px");
38 is(computedStyle2.borderTopWidth, "0px");
39 is(computedStyle2.borderBottomWidth, "0px");
40 </script>
41 </pre>
42 </body>
43 </html>