Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / invalidation / detach-reattach.html
blob6403f5f0014a9f02bb9d3b4d945775cf98954205
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <style>
4 .a { width: 100px; height: 100px; background-color: green; }
5 </style>
6 <script>
7 var inner;
8 onload = function() {
9 var root = document.getElementById('root');
10 var mid = document.createElement('div');
11 root.appendChild(mid);
13 inner = document.createElement('div');
14 mid.appendChild(inner);
16 inner.offsetTop;
17 inner.classList.add('a');
18 mid.remove();
19 root.offsetTop;
20 root.appendChild(mid);
21 inner.offsetTop;
22 inner.classList.remove('a');
24 shouldBe('getComputedStyle(inner).backgroundColor', '"rgba(0, 0, 0, 0)"');
26 </script>
27 <div id="root"></div>