Index: third_party/WebKit/LayoutTests/editing/caret/caret-height-multi-line.html |
diff --git a/third_party/WebKit/LayoutTests/editing/caret/caret-height-multi-line.html b/third_party/WebKit/LayoutTests/editing/caret/caret-height-multi-line.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2fcb1bb79e307378284f6ee373f842beb4c2eaec |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/editing/caret/caret-height-multi-line.html |
@@ -0,0 +1,35 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<style> |
+div { |
+ border: 2px solid red; |
+ padding: 12px; |
+ line-height: 1.66666667; |
+ width: 70px; |
+} |
+</style> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+</head> |
+<body> |
+ <div contenteditable id="editor"> |
+ The caret |
+ <span id="line2"> height should be the same for each line.</span> |
+ </div> |
+<script> |
+test(function () { |
+ var editor = document.getElementById('editor'); |
+ editor.focus(); |
+ |
+ var caretHeight1 = window.internals.absoluteCaretBounds().height; |
+ var sel = window.getSelection(); |
+ sel.collapse(line2, 0); |
+ var caretHeight2 = window.internals.absoluteCaretBounds().height; |
+ |
+ assert_equals(caretHeight1, caretHeight2, 'The caret height is the same for each line.'); |
+}, 'Compare the caret height'); |
+</script> |
+</body> |
+</html> |
+ |