Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: LayoutTests/fast/events/drag-selects-culled-inlines.html

Issue 929883003: Resolve flickering the text selection when hitting culled inline. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..dc6dd9706dd194b8ca815a1a304efcba2b6af92a
--- /dev/null
+++ b/LayoutTests/fast/events/drag-selects-culled-inlines.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<style>
+.style1 { font-size: 14px; color: #CC3300; }
+.text1 { font-size: 11px; color: #7f0000; }
+</style>
+<div id="test" class="style1" height="106">
pdr. 2015/02/16 20:24:09 Is this explicit height required?
Miyoung Shin(g) 2015/02/17 05:01:54 Done.
+<font><br>
+<span class="text1">Some Text1 <span id="noRange" style="font-weight: 400"> <b>Some Text2</b></span><br>Some Text3<br></strong>Some Text4<br></span>
+</font>
+</div>
+<div id="description">
+</div>
+<script src="../../resources/js-test.js"></script>
+<script>
+ jsTestIsAsync = true;
+ var testDone = false;
+ description('Test that flickering is observed on text selection when culled inline is selected')
+
+ document.onselectionchange = function () {
+ shouldBeFalse("window.getSelection().containsNode(document.getElementById('noRange'))");
+ if (testDone)
+ finishJSTest();
+ }
+
+ if (window.testRunner && window.eventSender) {
+ var element = document.getElementById('test');
+ eventSender.mouseMoveTo(element.offsetLeft + 10, element.offsetTop + element.offsetHeight - 1);
+ eventSender.mouseDown();
+ // move to the position of culled inline.
+ eventSender.mouseMoveTo(element.offsetLeft + 10, element.offsetHeight - 25);
pdr. 2015/02/16 20:24:09 offsetHeight - 25 may be flaky on other platforms.
Miyoung Shin(g) 2015/02/17 05:01:54 Done.I changed it to use only the offsetTop and of
+ eventSender.mouseUp();
+ testDone = true;
+ }
+</script>

Powered by Google App Engine
This is Rietveld 408576698