Index: third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint.html |
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint.html b/third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint.html |
index d0185bc6f5e5bd43cf252d7380f42eeebf3075e1..d12c6bd1a46d44d800602cd4753c644205b0701f 100644 |
--- a/third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint.html |
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint.html |
@@ -1,30 +1,31 @@ |
<!DOCTYPE html> |
<style> |
- ::selection { |
+ #t1::selection { |
background-color: transparent; |
color: red |
} |
.green::selection { |
- color: green |
+ color: green !important |
} |
</style> |
-<span id="t1">This text should be green.</span> |
+<span id="t1">This text </span><span id="t2">should be green.</span> |
<script> |
if (window.testRunner) |
testRunner.waitUntilDone(); |
- function setSelection(textNode) { |
+ function setSelection(startNode, endNode) { |
window.getSelection().removeAllRanges(); |
var range = document.createRange(); |
- range.setStart(textNode, 0); |
- range.setEnd(textNode, textNode.data.length); |
+ range.setStart(startNode, 0); |
+ range.setEnd(endNode, endNode.data.length); |
window.getSelection().addRange(range); |
} |
- setSelection(t1.firstChild); |
+ setSelection(t1.firstChild, t2.firstChild); |
requestAnimationFrame(() => |
requestAnimationFrame(() => { |
t1.className = "green"; |
+ t2.className = "green"; |
if (window.testRunner) |
testRunner.notifyDone(); |
})); |