blob: ca748cf21172b675c3f590c3503b280da8e4898a [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/ahem.js"></script>
<script type="text/javascript" src="../editing.js"></script>
<script type="text/javascript" src="resources/block-cursor-utils.js"></script>
<script src="../../resources/js-test.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>
</html>