layout/style/test/test_bug412901.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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="/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=412901">Mozilla Bug 412901</a>
    13 <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;">
    14 <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;">
    15 <p id="display"></p>
    16 </div>
    17 <div id="content" style="display: none">
    19 </div>
    20 <pre id="test">
    21 <script class="testbody" type="text/javascript">
    23 /** Test for Bug 412901 **/
    25 var div = document.getElementById("testDiv");
    26 var computedStyle = document.defaultView.getComputedStyle(div, "");
    27 // we never round down to 0px, very small widths are rounded up to 1px
    28 is(computedStyle.borderLeftWidth, "1px");
    29 is(computedStyle.borderRightWidth, "0px");
    30 is(computedStyle.borderTopWidth, "2px");
    31 is(computedStyle.borderBottomWidth, "5px");
    33 var div2 = document.getElementById("testDiv2");
    34 var computedStyle2 = document.defaultView.getComputedStyle(div2, "");
    35 is(computedStyle2.borderLeftWidth, "0px");
    36 is(computedStyle2.borderRightWidth, "0px");
    37 is(computedStyle2.borderTopWidth, "0px");
    38 is(computedStyle2.borderBottomWidth, "0px");
    39 </script>
    40 </pre>
    41 </body>
    42 </html>

mercurial