summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/flexbox/box-size-integer-overflow.html
blob: 598b6b4ead7ace95bb63c19e5f002aa51e7410f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<html>
<head>
<script>
window.onload = function() {
  if (window.testRunner)
    window.testRunner.dumpAsText();

  var cell = document.getElementById("cell");
  var text = cell.firstElementChild;
  var wdiff = cell.offsetWidth - text.offsetWidth - (parseInt(window.getComputedStyle(cell).getPropertyValue('padding-right')) +
                                                     parseInt(window.getComputedStyle(cell).getPropertyValue('padding-left')));
  if (wdiff > 0)
    text.innerText = "PASS";
}
</script>
</head>
<body>
<div style="float: left;">
  <div style="display: -webkit-box; border: 1px solid">
    <table>
      <tr>
        <td></td>
        <td id="cell" style="background-color: green; width: 100%; height: 30px">
          <span>FAIL</span>
        </td>
      </tr>
    </table>
  </div>
</div>
<div style="clear: left;">The green box should be the full width of the page.</div>
</body>
</html>