OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../js/resources/js-test-pre.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <p> | 7 <p> |
8 Should not wrap when zooming out. | 8 Should not wrap when zooming out. |
9 </p> | 9 </p> |
10 <div style="width: 100px;"> | 10 <div style="width: 100px;"> |
11 <div id="col-a" style="width: 20px; margin-right: 1px; float: left;
background: blue;">A</div> | 11 <div id="col-a" style="width: 20px; margin-right: 1px; float: left;
background: blue;">A</div> |
12 <div style="float: left;"> | 12 <div style="float: left;"> |
13 <div id="col-b" style="width: 79px; background: green;">B</div> | 13 <div id="col-b" style="width: 79px; background: green;">B</div> |
14 </div> | 14 </div> |
15 </div> | 15 </div> |
16 <script> | 16 <script> |
17 var elementA = document.getElementById('col-a'); | 17 var elementA = document.getElementById('col-a'); |
18 var elementB = document.getElementById('col-b'); | 18 var elementB = document.getElementById('col-b'); |
19 for (var zoom = 5; zoom <= 100; zoom += 5) { | 19 for (var zoom = 5; zoom <= 100; zoom += 5) { |
20 document.body.style.zoom = zoom / 100; | 20 document.body.style.zoom = zoom / 100; |
21 if (elementA.getBoundingClientRect().top == elementB.getBounding
ClientRect().top) | 21 if (elementA.getBoundingClientRect().top == elementB.getBounding
ClientRect().top) |
22 testPassed('At ' + zoom + '% zoom elements are on the same l
ine.'); | 22 testPassed('At ' + zoom + '% zoom elements are on the same l
ine.'); |
23 else | 23 else |
24 testFailed('At ' + zoom + '% zoom elementA.top is ' + elemen
tA.getBoundingClientRect().top + ' and elementB.top is ' + elementB.getBoundingC
lientRect().top + '.'); | 24 testFailed('At ' + zoom + '% zoom elementA.top is ' + elemen
tA.getBoundingClientRect().top + ' and elementB.top is ' + elementB.getBoundingC
lientRect().top + '.'); |
25 } | 25 } |
26 </script> | 26 </script> |
27 </body> | 27 </body> |
28 </html> | 28 </html> |
OLD | NEW |