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

Unified Diff: LayoutTests/editing/selection/block-cursor-overtype-mode-rtl.html

Issue 14859008: Use a block cursor in overtype mode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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/editing/selection/block-cursor-overtype-mode-rtl.html
diff --git a/LayoutTests/editing/selection/block-cursor-overtype-mode-rtl.html b/LayoutTests/editing/selection/block-cursor-overtype-mode-rtl.html
new file mode 100644
index 0000000000000000000000000000000000000000..b599627a25f674be7ddc49a59e5eb24ee37d1565
--- /dev/null
+++ b/LayoutTests/editing/selection/block-cursor-overtype-mode-rtl.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="../editing.js"></script>
+<script type="text/javascript" src="resources/block-cursor-utils.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js" type="text/javascript"></script>
+</head>
+<body style="font: 20px Ahem">
+<p>This test checks that the cursor covers the next character to be overwritten in overtype mode instead of being painted as a caret (1px width bar)</p>
+<div id="ltrtext-rtl" style="direction: rtl;" contenteditable="true">ABC</div>
+<div id="rtltext-rtl" style="direction: rtl;" contenteditable="true">&#x05e9;&#x05d3;&#x05df;</div>
+<div id="mixed-rtl" style="direction: rtl;" contenteditable="true">&#x05e9;&#x05d3;&#x05df;ABC</div>
+<div id="console"></div>
+</body>
+<script>
+
+if (window.testRunner) {
+
+ internals.toggleOverwriteModeEnabled(document);
+
+ verifyBlockCursorLeftPositionAndWidth("ltrtext-rtl", ["<", "<"]);
+ verifyBlockCursorLeftPositionAndWidth("rtltext-rtl", [">", ">"]);
+ verifyBlockCursorLeftPositionAndWidth("mixed-rtl", [">", ">", ">", "<", "<"]);
+}
+</script>
+<script src="../../fast/js/resources/js-test-post.js" type="text/javascript"></script>
+</html>

Powered by Google App Engine
This is Rietveld 408576698