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=861217 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Test for Bug 861217</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 | </head> |
michael@0 | 11 | <body onload="runTest()"> |
michael@0 | 12 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=861217">Mozilla Bug 861217</a> |
michael@0 | 13 | <p id="display"></p> |
michael@0 | 14 | <div id="content"> |
michael@0 | 15 | <table border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed; width: 50px"> |
michael@0 | 16 | <tbody> |
michael@0 | 17 | <tr> |
michael@0 | 18 | <td id="tableCell1" style="overflow: hidden"><div style="width: 100px; height: 100px; background-color: DodgerBlue">1</div></td> |
michael@0 | 19 | </tr> |
michael@0 | 20 | <tr> |
michael@0 | 21 | <td id="tableCell2" style="overflow: hidden"><div style="margin-top: 5px; margin-left: 7px; width: 100px; height: 100px; background-color: SkyBlue">2</div></td> |
michael@0 | 22 | </tr> |
michael@0 | 23 | <tr> |
michael@0 | 24 | <td id="tableCell3" style="overflow: hidden"><div style="display: inline-block; margin-right: 8px; margin-bottom: 10px; width: 100px; height: 100px; background-color: Khaki">3</div></td> |
michael@0 | 25 | </tr> |
michael@0 | 26 | <tr> |
michael@0 | 27 | <td id="tableCell4" style="overflow: hidden"><div style="display: inline-block; margin-right: 3px; margin-left: 1px; box-sizing: border-box; width: 100px; height: 100px; border-left: 6px solid black; border-bottom: 2px solid black; background-color: LightCoral">4</div></td> |
michael@0 | 28 | </tr> |
michael@0 | 29 | <tr> |
michael@0 | 30 | <td id="tableCell5" style="overflow: hidden"><div style="display: inline-block; border-right: 9px solid black; width: 100px; height: 100px; background-color: LightSeaGreen">5</div></td> |
michael@0 | 31 | </tr> |
michael@0 | 32 | <tr> |
michael@0 | 33 | <td id="tableCell6" style="overflow: hidden"><div style="box-sizing: border-box; width: 100px; height: 100px; padding-top: 3px; padding-right: 13px; background-color: Orange">6</div></td> |
michael@0 | 34 | </tr> |
michael@0 | 35 | <tr> |
michael@0 | 36 | <td id="tableCell7" style="overflow: hidden"><div style="display: inline-block; margin-right: 11px; margin-left: 4px; box-sizing: border-box; width: 100px; height: 100px; border-right: 6px solid black; border-bottom: 8px solid black; padding-top: 5px; padding-right: 9px; padding-bottom: 8px; padding-left: 7px; background-color: Silver">7</div></td> |
michael@0 | 37 | </tr> |
michael@0 | 38 | <tr> |
michael@0 | 39 | <td id="tableCell8" style="overflow: hidden"><div style="display: inline-block; margin-top: 7px; margin-bottom: 1px; border-right: 6px solid black; border-bottom: 8px solid black; padding-top: 5px; padding-right: 9px; padding-bottom: 8px; padding-left: 7px; width: 100px; height: 100px; background-color: Turquoise">8</div></td> |
michael@0 | 40 | </tr> |
michael@0 | 41 | </tbody> |
michael@0 | 42 | </table> |
michael@0 | 43 | <div id="status" style="display: none"></div> |
michael@0 | 44 | </div> |
michael@0 | 45 | <pre id="test"> |
michael@0 | 46 | <script class="testbody" type="text/javascript"> |
michael@0 | 47 | |
michael@0 | 48 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 49 | |
michael@0 | 50 | /** Test for Bug 861217 **/ |
michael@0 | 51 | function runTest() { |
michael@0 | 52 | var tableCell1 = document.getElementById("tableCell1"), |
michael@0 | 53 | bcr1 = tableCell1.getBoundingClientRect(), |
michael@0 | 54 | tableCell2 = document.getElementById("tableCell2"), |
michael@0 | 55 | bcr2 = tableCell2.getBoundingClientRect(), |
michael@0 | 56 | tableCell3 = document.getElementById("tableCell3"), |
michael@0 | 57 | bcr3 = tableCell3.getBoundingClientRect(), |
michael@0 | 58 | tableCell4 = document.getElementById("tableCell4"), |
michael@0 | 59 | bcr4 = tableCell4.getBoundingClientRect(), |
michael@0 | 60 | tableCell5 = document.getElementById("tableCell5"), |
michael@0 | 61 | bcr5 = tableCell5.getBoundingClientRect(), |
michael@0 | 62 | tableCell6 = document.getElementById("tableCell6"), |
michael@0 | 63 | bcr6 = tableCell6.getBoundingClientRect(), |
michael@0 | 64 | tableCell7 = document.getElementById("tableCell7"), |
michael@0 | 65 | bcr7 = tableCell7.getBoundingClientRect(), |
michael@0 | 66 | tableCell8 = document.getElementById("tableCell8"), |
michael@0 | 67 | bcr8 = tableCell8.getBoundingClientRect(); |
michael@0 | 68 | |
michael@0 | 69 | is(bcr1.width, 50, "Width of bounding client rect of #tableCell1"); |
michael@0 | 70 | is(tableCell1.scrollWidth, 100, "scrollWidth of #tableCell1"); |
michael@0 | 71 | is(bcr1.height, 100, "Height of bounding client rect of #tableCell1"); |
michael@0 | 72 | is(tableCell1.scrollHeight, 100, "scrollHeight of #tableCell1"); |
michael@0 | 73 | |
michael@0 | 74 | is(bcr2.width, 50, "Width of bounding client rect of #tableCell2"); |
michael@0 | 75 | is(tableCell2.scrollWidth, 107, "scrollWidth of #tableCell2"); |
michael@0 | 76 | is(bcr2.height, 105, "Height of bounding client rect of #tableCell2"); |
michael@0 | 77 | is(tableCell2.scrollHeight, 105, "scrollHeight of #tableCell2"); |
michael@0 | 78 | |
michael@0 | 79 | is(bcr3.width, 50, "Width of bounding client rect of #tableCell3"); |
michael@0 | 80 | is(tableCell3.scrollWidth, 108, "scrollWidth of #tableCell3"); |
michael@0 | 81 | is(bcr3.height, 110, "Height of bounding client rect of #tableCell3"); |
michael@0 | 82 | is(tableCell3.scrollHeight, 110, "scrollHeight of #tableCell3"); |
michael@0 | 83 | |
michael@0 | 84 | is(bcr4.width, 50, "Width of bounding client rect of #tableCell4"); |
michael@0 | 85 | is(tableCell4.scrollWidth, 104, "scrollWidth of #tableCell4"); |
michael@0 | 86 | is(bcr4.height, 100, "Height of bounding client rect of #tableCell4"); |
michael@0 | 87 | is(tableCell4.scrollHeight, 100, "scrollHeight of #tableCell4"); |
michael@0 | 88 | |
michael@0 | 89 | is(bcr5.width, 50, "Width of bounding client rect of #tableCell5"); |
michael@0 | 90 | is(tableCell5.scrollWidth, 109, "scrollWidth of #tableCell5"); |
michael@0 | 91 | is(bcr5.height, 100, "Height of bounding client rect of #tableCell5"); |
michael@0 | 92 | is(tableCell5.scrollHeight, 100, "scrollHeight of #tableCell5"); |
michael@0 | 93 | |
michael@0 | 94 | is(bcr6.width, 50, "Width of bounding client rect of #tableCell6"); |
michael@0 | 95 | is(tableCell6.scrollWidth, 100, "scrollWidth of #tableCell6"); |
michael@0 | 96 | is(bcr6.height, 100, "Height of bounding client rect of #tableCell6"); |
michael@0 | 97 | is(tableCell6.scrollHeight, 100, "scrollHeight of #tableCell6"); |
michael@0 | 98 | |
michael@0 | 99 | is(bcr7.width, 50, "Width of bounding client rect of #tableCell7"); |
michael@0 | 100 | is(tableCell7.scrollWidth, 115, "scrollWidth of #tableCell7"); |
michael@0 | 101 | is(bcr7.height, 100, "Height of bounding client rect of #tableCell7"); |
michael@0 | 102 | is(tableCell7.scrollHeight, 100, "scrollHeight of #tableCell7"); |
michael@0 | 103 | |
michael@0 | 104 | is(bcr8.width, 50, "Width of bounding client rect of #tableCell8"); |
michael@0 | 105 | is(tableCell8.scrollWidth, 122, "scrollWidth of #tableCell8"); |
michael@0 | 106 | is(bcr8.height, 129, "Height of bounding client rect of #tableCell8"); |
michael@0 | 107 | is(tableCell8.scrollHeight, 129, "scrollHeight of #tableCell8"); |
michael@0 | 108 | |
michael@0 | 109 | SimpleTest.finish(); |
michael@0 | 110 | } |
michael@0 | 111 | |
michael@0 | 112 | </script> |
michael@0 | 113 | </pre> |
michael@0 | 114 | </body> |
michael@0 | 115 | </html> |