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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/caret-in-empty-div-with-pseudo-content.html

Issue 2159373003: Cursor should respect text align in contenteditable with pseudo element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated ASSERT Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/selection/caret-in-empty-div-with-pseudo-content.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/caret-in-empty-div-with-pseudo-content.html b/third_party/WebKit/LayoutTests/editing/selection/caret-in-empty-div-with-pseudo-content.html
new file mode 100644
index 0000000000000000000000000000000000000000..8266c03d7fa0f4a3dac7a9b56e1b1b19973023e6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/caret-in-empty-div-with-pseudo-content.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+#div1, #div2 {
+ height: 200px;
+ width: 200px;
+ border: 1px solid black;
+}
+#div2 {
+ text-align: center;
+}
+div:before {
+ content: "Test";
+}
+</style>
+<div id="div1" contenteditable="true"></div>
+<div id="div2" contenteditable="true"></div>
+<script>
+test (function() {
+ var div1 = document.getElementById('div1');
+ div1.focus();
+ var caretRect1 = internals.absoluteCaretBounds(document);
+
+ var div2 = document.getElementById('div2');
+ div2.focus();
+ var caretRect2 = internals.absoluteCaretBounds(document);
+
+ assert_not_equals(caretRect1.left, caretRect2.left);
+}, "Tests if the cursor respects text align property in emtpy div having pseudo content");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698