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

Unified Diff: LayoutTests/editing/deleting/delete-last-character.html

Issue 13532011: Stop inserting placeholders for TextArea and Input elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Levi's nit Created 7 years, 8 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: LayoutTests/editing/deleting/delete-last-character.html
diff --git a/LayoutTests/editing/deleting/delete-last-character.html b/LayoutTests/editing/deleting/delete-last-character.html
new file mode 100644
index 0000000000000000000000000000000000000000..d5d98fcb7f996b275b3deb0a899fc31f22d3b82f
--- /dev/null
+++ b/LayoutTests/editing/deleting/delete-last-character.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+function deleteAndCheckShadowTreeDivIsEmpty(id)
+{
+ var elem = document.getElementById(id);
+ elem.focus();
+ elem.setSelectionRange(elem.value.length, elem.value.length);
+ document.execCommand("Delete");
+ if (internals.shadowRoot(elem).firstChild.innerHTML == '')
+ return true;
+ else
+ return false;
+}
+</script>
+</head>
+<body><input id="input" value="A" /><textarea id="textarea">B</textarea>
+<script>
+document.write((deleteAndCheckShadowTreeDivIsEmpty("input") && deleteAndCheckShadowTreeDivIsEmpty("textarea")) ? 'PASS' : 'FAIL' );
+</script></body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698