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..dcba83c5b485bfac51b68e14c32b529ba8db24d7 |
--- /dev/null |
+++ b/LayoutTests/editing/caret/caret-type-for-user-select-none.html |
@@ -0,0 +1,35 @@ |
+<!DOCTYPE html> |
+<html> |
+<body> |
+<p id="description">Tests whether explicitly set caret style is retained on performing text selection</p> |
yosin_UTC9
2013/09/18 03:42:26
See below for example of how to use description().
|
+<div style="cursor:progress" id="test">Try selecting this 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); |
yosin_UTC9
2013/09/18 03:42:26
We can also use leapForwardAndMove() here.
|
+ eventSender.mouseDown(); |
+ |
+ leapForwardAndMove(10); |
+ |
+ leapForwardAndMove(div.offsetWidth - 10); |
+ |
+ var cursorInfo = window.internals.getCurrentCursorInfo(document); |
+ var currentCursorType = cursorInfo.substring(cursorInfo.indexOf('=') + 1, cursorInfo.lastIndexOf(' ')); |
+ shouldBeEqualToString('currentCursorType', cursorType); |
+} |
+</script> |
+</html> |
yosin_UTC9
2013/09/18 03:42:26
You should load js-test-post.js, and start test st
|