| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 #target, #targetInShadow { | 5 #target, #targetInShadow { |
| 6 color: red; | 6 color: red; |
| 7 } | 7 } |
| 8 </style> | 8 </style> |
| 9 <script src="../../js/resources/js-test-pre.js"></script> | 9 <script src="../../js/resources/js-test-pre.js"></script> |
| 10 <script> | 10 <script> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 debug("Test a span in some shadow dom tree. Since the span's host node is the ab
ove target, we have to see all inserted scoped styles and an author style to fin
d whether the styles have any matched rules or not."); | 52 debug("Test a span in some shadow dom tree. Since the span's host node is the ab
ove target, we have to see all inserted scoped styles and an author style to fin
d whether the styles have any matched rules or not."); |
| 53 shouldBe("window.getComputedStyle(targetInShadow).color", '"rgb(0, 0, 255)"'); | 53 shouldBe("window.getComputedStyle(targetInShadow).color", '"rgb(0, 0, 255)"'); |
| 54 | 54 |
| 55 var styleInShadow = document.createElement("style"); | 55 var styleInShadow = document.createElement("style"); |
| 56 styleInShadow.innerHTML = "span { color: lime; }"; | 56 styleInShadow.innerHTML = "span { color: lime; }"; |
| 57 shadowRoot.appendChild(styleInShadow); | 57 shadowRoot.appendChild(styleInShadow); |
| 58 debug("Append a new style element to the shadow root. The style's scoping elemen
t is the shadow root. Rules in the style should override other rules in ascendan
t (scoped) styles."); | 58 debug("Append a new style element to the shadow root. The style's scoping elemen
t is the shadow root. Rules in the style should override other rules in ascendan
t (scoped) styles."); |
| 59 shouldBe("window.getComputedStyle(targetInShadow).color", '"rgb(0, 255, 0)"'); | 59 shouldBe("window.getComputedStyle(targetInShadow).color", '"rgb(0, 255, 0)"'); |
| 60 | 60 |
| 61 </script> | 61 </script> |
| 62 <script src="../../js/resources/js-test-post.js"></script> | |
| 63 </html> | 62 </html> |
| OLD | NEW |