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

Unified Diff: LayoutTests/editing/caret/caret-color.html

Issue 14098003: Change the caret color according to the lightness of the background color. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/editing/caret/caret-color-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/caret/caret-color.html
diff --git a/LayoutTests/editing/caret/caret-color.html b/LayoutTests/editing/caret/caret-color.html
new file mode 100644
index 0000000000000000000000000000000000000000..27f8a11f08ea715ae9961b39cc20b090f71b16ef
--- /dev/null
+++ b/LayoutTests/editing/caret/caret-color.html
@@ -0,0 +1,38 @@
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ moveSelectionForwardByLineCommand();
+ moveSelectionLeftByCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+<p>This tests to make sure that the caret is visible in the black background by getting the caret color from the color of the element(span) containing the text, not the parent element(div) that has the contentEditable attribute.
+</p>
+<div contenteditable id="root" class="editing">
+<span id="test" style="color: white; background-color: black">Where is my caret?</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
+
+
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/editing/caret/caret-color-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698