Chromium Code Reviews| Index: LayoutTests/fast/events/drag-selects-culled-inlines.html |
| diff --git a/LayoutTests/fast/events/drag-selects-culled-inlines.html b/LayoutTests/fast/events/drag-selects-culled-inlines.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..afb625643fa03de303b807a298f246ad8d76c5ea |
| --- /dev/null |
| +++ b/LayoutTests/fast/events/drag-selects-culled-inlines.html |
| @@ -0,0 +1,38 @@ |
| +<!DOCTYPE html> |
| +<style> |
| +.style1 { font-size: 14px; color: #CC3300; } |
| +.text1 { font-size: 11px; color: #7f0000; } |
| +</style> |
| +<div id="test" class="style1"> |
| +<font> |
| +<span class="text1">Some Text1 <span id="noRange" style="font-weight: 400"> <b>Some Text2</b></span><br>Some Text3<br><b id="lastLine">Some Text4</b><br></span> |
| +</font> |
| +</div> |
| +<p id="description"> |
| +<div id="console"> |
| +</div> |
| +</p> |
| +<script src="../../resources/js-test.js"></script> |
| +<script> |
| + jsTestIsAsync = true; |
| + var testDone = false; |
|
pdr.
2015/02/18 00:00:49
Nit: lets rename this selectionComplete
Miyoung Shin(g)
2015/02/18 08:28:26
Done.
|
| + description('Test that flickering is observed on text selection when culled inline is selected') |
|
pdr.
2015/02/18 00:00:49
Nit: missing semicolon.
Miyoung Shin(g)
2015/02/18 08:28:26
Done.
|
| + |
| + document.onselectionchange = function () { |
| + shouldBeFalse("window.getSelection().containsNode(document.getElementById('noRange'))"); |
| + if (testDone) |
| + finishJSTest(); |
| + } |
| + |
| + if (window.testRunner && window.eventSender) { |
| + var lastLine = document.getElementById('lastLine'); |
| + |
| + eventSender.mouseMoveTo(lastLine.offsetLeft + 10, lastLine.offsetTop + lastLine.offsetHeight); |
| + eventSender.mouseDown(); |
| + |
| + // move to the position of culled inline. |
| + eventSender.mouseMoveTo(lastLine.offsetLeft + 10, lastLine.offsetTop - 1); |
| + eventSender.mouseUp(); |
| + testDone = true; |
| + } |
| +</script> |