Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / invalidation / shadow-host-toggle.html
blob02bdfb997715e753fcf9fc555ae0d41b670a408e
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <div></div>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
7 var host = document.querySelector('div');
8 var root = host.createShadowRoot();
9 root.innerHTML = '<style>:host(.enabled) #foo { background: green;}</style><div id="foo"></div>';
11 var foo = root.querySelector("#foo");
12 host.classList.add('enabled');
13 shouldBe('getComputedStyle(foo).backgroundColor', '"rgb(0, 128, 0)"');
14 </script>