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..05eb5de9b67c06d5171de223fdef4e18803e4923 |
--- /dev/null |
+++ b/LayoutTests/editing/selection/place-caret-on-single-click-within-selected-readonly-text.html |
@@ -0,0 +1,27 @@ |
+<html> |
+<body> |
+<p id="target">Some Text</p> |
+<p>This tests caret placement when clicked once on existing selection in readonly texts to allow further selection using keys.</p> |
Yuta Kitamura
2014/06/04 08:19:38
You can use description() function from js-test to
b.rout
2014/06/04 12:53:04
Ok.
|
+<div id="console"></div> |
Yuta Kitamura
2014/06/04 08:19:38
js-test automatically creates the element for outp
b.rout
2014/06/04 12:53:04
Actually, I want the HTML content to come before t
|
+<script src="../../resources/js-test.js"></script> |
+<script> |
+ if (window.testRunner) { |
Yuta Kitamura
2014/06/04 08:19:38
As a general rule, it is recommended to make the t
b.rout
2014/06/04 12:53:04
Ok. I will update the tests with instructions to m
|
+ 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> |