Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=417255 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Test for Bug 417255</title> |
michael@0 | 8 | <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 9 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
michael@0 | 10 | <style> |
michael@0 | 11 | .spacer { display:inline-block; height:10px; } |
michael@0 | 12 | </style> |
michael@0 | 13 | </head> |
michael@0 | 14 | <body> |
michael@0 | 15 | |
michael@0 | 16 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=417255">Mozilla Bug 417255</a> |
michael@0 | 17 | <div id="display" style="width:800px"></div> |
michael@0 | 18 | |
michael@0 | 19 | <div><span id="s1" style="border:2px dotted red;"><span class="spacer" style="width:100px"></span> |
michael@0 | 20 | <div style="width:500px; height:100px; background:yellow;"></div> |
michael@0 | 21 | <span class="spacer" style="width:200px"></span></span></div> |
michael@0 | 22 | |
michael@0 | 23 | <div><span id="s2" style="border:2px dotted red;"><span class="spacer" style="width:100px"></span> |
michael@0 | 24 | <div style="width:150px; height:100px; background:yellow;"></div> |
michael@0 | 25 | <span class="spacer" style="width:200px"></span></span></div> |
michael@0 | 26 | |
michael@0 | 27 | <!-- test nested spans around the IB split --> |
michael@0 | 28 | <div><span id="s3" style="border:2px dotted red;"><span><span class="spacer" style="width:100px"></span> |
michael@0 | 29 | <div style="width:500px; height:100px; background:yellow;"></div> |
michael@0 | 30 | <span class="spacer" style="width:200px"></span></span></span></div> |
michael@0 | 31 | |
michael@0 | 32 | <div id="content" style="display: none"> |
michael@0 | 33 | |
michael@0 | 34 | </div> |
michael@0 | 35 | |
michael@0 | 36 | <pre id="test"> |
michael@0 | 37 | <script class="testbody" type="text/javascript"> |
michael@0 | 38 | |
michael@0 | 39 | function getWidth(box) { |
michael@0 | 40 | return box.right - box.left; |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | function doTest(id, boundsWidth, w1, w2, w3) { |
michael@0 | 44 | var s = document.getElementById(id); |
michael@0 | 45 | is(s.offsetWidth, boundsWidth, "bad offsetWidth"); |
michael@0 | 46 | is(getWidth(s.getBoundingClientRect()), boundsWidth, "bad getBoundingClientRect width"); |
michael@0 | 47 | is(getWidth(s.getClientRects()[0]), w1, "bad getClientRects width"); |
michael@0 | 48 | is(getWidth(s.getClientRects()[1]), w2, "bad getClientRects width"); |
michael@0 | 49 | is(getWidth(s.getClientRects()[2]), w3, "bad getClientRects width"); |
michael@0 | 50 | } |
michael@0 | 51 | |
michael@0 | 52 | doTest("s1", 500, 102, 500, 202); |
michael@0 | 53 | doTest("s2", 202, 102, 150, 202); |
michael@0 | 54 | doTest("s3", 500, 102, 500, 202); |
michael@0 | 55 | |
michael@0 | 56 | </script> |
michael@0 | 57 | </pre> |
michael@0 | 58 | </body> |
michael@0 | 59 | |
michael@0 | 60 | </html> |