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

Unified Diff: LayoutTests/editing/caret/caret-type-for-user-select-none.html

Issue 23461040: Selection should not set the cursor type to text over the explicitly set cursor type. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch updated Created 7 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/editing/caret/caret-type-for-user-select-none-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/caret/caret-type-for-user-select-none.html
diff --git a/LayoutTests/editing/caret/caret-type-for-user-select-none.html b/LayoutTests/editing/caret/caret-type-for-user-select-none.html
new file mode 100644
index 0000000000000000000000000000000000000000..5d8aabc82d45d655ab2e74534218a1a8819f2d7f
--- /dev/null
+++ b/LayoutTests/editing/caret/caret-type-for-user-select-none.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p><b>Tests whether explicitly set caret style is retained on performing text selection</b></p>
yosin_UTC9 2013/09/17 09:46:38 nit: We may want to use description('Tests where..
+<div style="cursor:progress" id="test">Try selecting the text by dragging the cursor.</div>
+</body>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script>
+if (window.eventSender && window.internals) {
+ var cursorType = 'Progress';
+
+ var div = document.getElementById("test");
+ div.focus();
+
+ var y = div.offsetTop + div.offsetHeight / 2;
+
+ function leapForwardAndMove(x) {
+ eventSender.leapForward(200);
+ eventSender.mouseMoveTo(div.offsetLeft + x, y);
+ }
+
+ eventSender.dragMode = false;
+ eventSender.mouseMoveTo(div.offsetLeft + 5, y);
+ eventSender.mouseDown();
+
+ leapForwardAndMove(10);
+
+ leapForwardAndMove(div.offsetWidth - 10);
+
+ var cursorInfo = window.internals.getCurrentCursorInfo(document);
+ var currentCursorType = cursorInfo.substring(cursorInfo.indexOf('=')+1, cursorInfo.lastIndexOf(' '));
yosin_UTC9 2013/09/17 09:46:38 nit: put spaces around "+".
+ shouldBe('currentCursorType', 'cursorType');
yosin_UTC9 2013/09/17 09:46:38 shouldBeEqualToString('currentCurosrType', cursorT
+}
+</script>
+</html>
« no previous file with comments | « no previous file | LayoutTests/editing/caret/caret-type-for-user-select-none-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698