Index: third_party/WebKit/LayoutTests/editing/caret/caret-in-empty-cell-expected.html |
diff --git a/third_party/WebKit/LayoutTests/editing/caret/caret-in-empty-cell-expected.html b/third_party/WebKit/LayoutTests/editing/caret/caret-in-empty-cell-expected.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d2d669cdaffcf83b8c961d4751fec6aca24e6462 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/editing/caret/caret-in-empty-cell-expected.html |
@@ -0,0 +1,29 @@ |
+<!DOCTYPE html> |
+<meta charset="utf-8"> |
+<title>Check caret position inside empty cell</title> |
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> |
+<style> |
+ table { |
+ font-size: 2em; |
+ } |
+ td { |
+ vertical-align: top; |
+ padding: 5px; |
+ } |
+ #emptycell { |
+ width: 50%; |
+ } |
+</style> |
+ |
+<p>Test passes if the caret in the empty cell is inside the cell itself (that means it's vertically aligned with the reference text).</p> |
+ |
+<table border="1" contenteditable> |
+ <td>Reference text</td> |
+ <td id="emptycell"></td> |
+</table> |
+ |
+<script> |
+ var selection = window.getSelection(); |
+ var emptycell = document.getElementById("emptycell"); |
+ selection.collapse(emptycell, 0); |
+</script> |