layout/generic/test/test_bug841361.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=841361
     5 -->
     6 <head>
     7   <title>Test for Bug 841361</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=841361">Mozilla Bug 841361</a>
    13 <p id="display">
    15 <div style="width:500px; height:0;" id="a"></div>
    17 <div style="width:0; height:500px;" id="b"></div>
    19 <div style="width:500px;" id="c">
    20   <div style="width:50px; height:50px; float:left; background:yellow"></div>
    21   <div style="width:200px; height:50px; float:left; background:green"></div>
    22 </div>
    24 <div style="width:500px; height:0; overflow:hidden" id="d"></div>
    26 <div style="width:0; height:500px; overflow:hidden" id="e"></div>
    28 <div style="width:500px; overflow:hidden" id="f">
    29   <div style="width:50px; height:50px; float:left; background:yellow"></div>
    30   <div style="width:200px; height:50px; float:left; background:green"></div>
    31 </div>
    33 </p>
    34 <div id="content" style="display: none">
    36 </div>
    37 <pre id="test">
    38 <script class="testbody" type="text/javascript">
    40 function doTest(id, w, h) {
    41   var e = document.getElementById(id);
    42   is(e.scrollWidth, w, "scrollWidth for element '" + id + "'");
    43   is(e.scrollHeight, h, "scrollHeight for element '" + id + "'");
    44 }
    46 doTest("a", 500, 0);
    47 doTest("b", 0, 500);
    48 doTest("c", 500, 50);
    49 doTest("d", 500, 0);
    50 doTest("e", 0, 500);
    51 doTest("f", 500, 50);
    53 </script>
    54 </pre>
    55 </body>
    56 </html>

mercurial