Index: LayoutTests/fast/selectors/shadow-host-div-with-span.html |
diff --git a/LayoutTests/fast/selectors/shadow-host-div-with-span.html b/LayoutTests/fast/selectors/shadow-host-div-with-span.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..72b7931d092672a948bb0224ba0ba01d75db8abf |
--- /dev/null |
+++ b/LayoutTests/fast/selectors/shadow-host-div-with-span.html |
@@ -0,0 +1,27 @@ |
+<!DOCTYPE html> |
+<style> |
+ span::selection { background-color: rgba(63, 128, 33, 0.95); color: yellow; } |
+</style> |
+<body onload="SelectText()"> |
+ <div id="container"> |
+ <span>DOM </span> |
+ <div id="shadowDiv" style="display:inline"></div> |
+ <span> DOM</span> |
+ </div> |
+ <div> |
+ Above Textual Selection should have Green background and yellow color on "DOM" <br> |
+ and Red background, Green color on "Shadow DOM". |
+ </div> |
+</body> |
+<script> |
+ var host = document.getElementById('shadowDiv'); |
+ var root = host.createShadowRoot(); |
+ root.innerHTML = '<style> span::selection { background-color: rgba(255, 0, 0, 0.95); color: green; } </style>' + |
+ '<span>Shadow DOM </span>'; |
+ |
+ function SelectText() { |
+ var ele = document.getElementById('container'); |
+ var selection = window.getSelection(); |
+ selection.selectAllChildren(ele); |
+ } |
+</script> |