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

Unified Diff: third_party/WebKit/LayoutTests/editing/input/caret-read-only-after-editable.html

Issue 2401363003: Use anchor node, rather than current selected node, to check editability. (Closed)
Patch Set: Feedback. Created 4 years, 2 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
Index: third_party/WebKit/LayoutTests/editing/input/caret-read-only-after-editable.html
diff --git a/third_party/WebKit/LayoutTests/editing/input/caret-read-only-after-editable.html b/third_party/WebKit/LayoutTests/editing/input/caret-read-only-after-editable.html
new file mode 100644
index 0000000000000000000000000000000000000000..7776f5026a7f294eca8b369a79f825c90c350723
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/input/caret-read-only-after-editable.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<script src="../../resources/run-after-layout-and-paint.js"></script>
+<style>
+#after {
+ color: #BBB;
+ -webkit-user-modify: read-only;
+}
+#editor {
+ -webkit-user-modify: read-write-plaintext-only;
+ border: 1px solid black;
+ font-size: 40px;
+}
+</style>
+Test passes if caret is visible after text is entered.
+<div id="editor"></div>
+<script>
+var after;
+editor.addEventListener("input",function(e) {
+ if (!after){
+ after = document.createElement("span");
+ after.id = "after";
+ after.textContent = "autocomplete hint text";
+ editor.appendChild(after);
+ }
+});
+runAfterLayoutAndPaint(function() {
+ editor.focus();
+ if (window.testRunner) {
+ eventSender.keyDown('a');
+ eventSender.keyDown('b');
+ }
+}, true);
+</script>

Powered by Google App Engine
This is Rietveld 408576698