Index: LayoutTests/editing/selection/place-caret-on-single-click-within-selected-readonly-text.html |
diff --git a/LayoutTests/editing/selection/place-caret-on-single-click-within-selected-readonly-text.html b/LayoutTests/editing/selection/place-caret-on-single-click-within-selected-readonly-text.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2567289ce89f17adb69a12ba0be6ed781a8ebd44 |
--- /dev/null |
+++ b/LayoutTests/editing/selection/place-caret-on-single-click-within-selected-readonly-text.html |
@@ -0,0 +1,31 @@ |
+<html> |
+<head> |
+<script src="../../resources/js-test.js"></script> |
+</head> |
+<body> |
+<p id="description"></p> |
+<p>To manually test it, first select non-editable content using mouse. Then click within the selected range. Now try to select using key combinations. It should allow you to do so.</p> |
+<p id="target">Some Text</p> |
+<div id="console"></div> |
+<script> |
+description("This tests caret placement when clicked once on existing selection in readonly texts to allow further selection using keys.") |
+ if (window.testRunner) { |
+ testRunner.overridePreference("WebKitEnableCaretBrowsing", false); |
+ testRunner.dumpAsText(); |
+ |
+ target = document.getElementById('target'); |
+ target.focus(); |
+ |
+ eventSender.mouseMoveTo(target.offsetLeft, target.offsetTop); |
+ eventSender.mouseDown(); |
+ eventSender.mouseMoveTo(target.offsetLeft + target.offsetWidth, target.offsetTop); |
+ eventSender.mouseUp(); |
+ |
+ eventSender.mouseMoveTo(target.offsetLeft + (target.offsetWidth / 3), target.offsetTop); |
+ eventSender.mouseDown(); |
+ eventSender.mouseUp(); |
+ shouldBeEqualToString("getSelection().type", "Caret"); |
+ } |
+</script> |
+</body> |
+</html> |