Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / block / positioning / positioned-movement-layout-when-margin-changes.html
bloba2c7e56033e203d371dfe07f6a477b8bfda62a79
1 <!DOCTYPE html>
2 <style>
3 .positioned {
4 top: 0;
5 position: absolute;
6 width: 100px;
7 height: 100px;
8 background-color: green;
10 .normal {
11 max-width: 100%;
12 display: block;
13 height: auto;
14 background-color: blue;
16 </style>
17 <p> Change in margin should move a positioned object.</p>
18 <ul id="container">
19 <li class="positioned">
20 <div class="normal">
21 </li>
22 </ul>
23 <script>
24 function test() {
25 document.querySelector('.positioned').style['margin-left'] = 'initial';
26 document.body.offsetTop;
27 for (var i = 0; i < 101; ++i) {
28 document.querySelector('.positioned').style['margin-left'] = i + "%";
31 window.onload = test;
32 </script>