Index: LayoutTests/fast/dom/shadow/cascade-of-treeboundary-crossing-rules.html |
diff --git a/LayoutTests/fast/dom/shadow/cascade-of-treeboundary-crossing-rules.html b/LayoutTests/fast/dom/shadow/cascade-of-treeboundary-crossing-rules.html |
index 5d7fadd610e18e40294cc022920ae29917b41cac..8cbd70c837d89e64309d24679b410876396d5539 100644 |
--- a/LayoutTests/fast/dom/shadow/cascade-of-treeboundary-crossing-rules.html |
+++ b/LayoutTests/fast/dom/shadow/cascade-of-treeboundary-crossing-rules.html |
@@ -36,18 +36,18 @@ function cleanUp() |
description('Test for casacde of treeboundary crossing rules.'); |
-// Rules declared in inner treescope should win. |
+// Rules declared in outer treescope should win. |
sandbox.appendChild( |
createDOM('div', {'id': 'host'}, |
createDOM('style', {}, |
- document.createTextNode('p:empty { border: 1px solid blue; }')), |
+ document.createTextNode('p:empty { border: 1px solid green; }')), |
createShadowRoot( |
createDOM('style', {}, |
document.createTextNode('::content > p { border: 1px solid red; }')), |
createDOM('div', {}, |
createShadowRoot( |
createDOM('style', {}, |
- document.createTextNode('::content > p { border: 1px solid green; }')), |
+ document.createTextNode('::content > p { border: 1px solid blue; }')), |
createDOM('content', {})), |
createDOM('content', {}))), |
createDOM('p', {'id': 'target'}))); |
@@ -103,6 +103,22 @@ borderColorShouldBe('host/target', 'rgb(0, 128, 0)'); |
cleanUp(); |
+// Comparing important rules declared in outer treescope with important rules declared in inner treescope. |
+// Inner's should win. |
+sandbox.appendChild( |
+ createDOM('div', {}, |
+ createDOM('style', {}, |
+ document.createTextNode('div { border: 1px solid red !important; }')), |
+ createDOM('div', {'id': 'host'}, |
+ createShadowRoot( |
+ createDOM('style', {}, |
+ document.createTextNode('#target { border: 1px solid green !important; }')), |
+ createDOM('p', {'id': 'target'}))))); |
+ |
+borderColorShouldBe('host/target', 'rgb(0, 128, 0)'); |
+ |
+cleanUp(); |
+ |
</script> |
</html> |