Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / dom / shadow / style-sharing-styles-in-older-shadow-roots.html
1 <!DOCTYPE html>
2
3 <style>
4     #sandbox div {
5         width: 50px;
6         height: 50px;
7     }
8 </style>
9
10 <script src="../../../resources/js-test.js"></script>
11
12 <div id="sandbox">
13     <div></div>
14     <div></div>
15 </div>
16
17 <script>
18 description("Should not share style if sibling has different styles in older shadow roots");
19
20 document.body.offsetTop;
21 div1 = document.getElementById("sandbox").firstElementChild;
22 div2 = document.getElementById("sandbox").lastElementChild;
23
24 div2.createShadowRoot();
25
26 div1.createShadowRoot();
27 div1.createShadowRoot().innerHTML = "<style>:host { background: red; }</style>";
28 shouldBeEqualToString("getComputedStyle(div1).backgroundColor", "rgb(255, 0, 0)");
29 </script>