Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / sub-pixel / float-with-margin-in-container.html
blobdfb27caaf2c924f01033f44ea04b1f885f880c78
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p>
8 Should not wrap when zooming out.
9 </p>
10 <div style="width: 100px;">
11 <div id="col-a" style="width: 20px; margin-right: 1px; float: left; background: blue;">A</div>
12 <div style="float: left;">
13 <div id="col-b" style="width: 79px; background: green;">B</div>
14 </div>
15 </div>
16 <script>
17 var elementA = document.getElementById('col-a');
18 var elementB = document.getElementById('col-b');
19 for (var zoom = 5; zoom <= 100; zoom += 5) {
20 document.body.style.zoom = zoom / 100;
21 if (elementA.getBoundingClientRect().top == elementB.getBoundingClientRect().top)
22 testPassed('At ' + zoom + '% zoom elements are on the same line.');
23 else
24 testFailed('At ' + zoom + '% zoom elementA.top is ' + elementA.getBoundingClientRect().top + ' and elementB.top is ' + elementB.getBoundingClientRect().top + '.');
26 </script>
27 </body>
28 </html>