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

Unified Diff: LayoutTests/editing/inserting/insert-without-inheriting-style.html

Issue 18452012: Should not inherit style from control like element during inserting text just after deleting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | LayoutTests/editing/inserting/insert-without-inheriting-style-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/inserting/insert-without-inheriting-style.html
diff --git a/LayoutTests/editing/inserting/insert-without-inheriting-style.html b/LayoutTests/editing/inserting/insert-without-inheriting-style.html
new file mode 100644
index 0000000000000000000000000000000000000000..71e5b5eaffb9d2ab71c29deaeae1036fe4e390ec
--- /dev/null
+++ b/LayoutTests/editing/inserting/insert-without-inheriting-style.html
@@ -0,0 +1,21 @@
+<div id="container">
+<div contenteditable="true" id="sample">foo <input type="button" value="bar"> baz</div>
+</div>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script>
+function $(id) { return document.getElementById(id); }
+
+var range = document.createRange();
+range.setStartAfter(document.querySelector('input'));
+var selection = window.getSelection();
+selection.removeAllRanges();
+selection.addRange(range);
+document.execCommand('Delete');
+document.execCommand('InsertText', false, 'quux');
+shouldBeEqualToString('$("sample").innerHTML', 'foo quux&nbsp;baz');
+
+if (window.testRunner)
+ $('container').outerHTML = '';
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
« no previous file with comments | « no previous file | LayoutTests/editing/inserting/insert-without-inheriting-style-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698