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

Unified Diff: LayoutTests/editing/inserting/insert-paragraph-after-non-editable-node-before-text.html

Issue 17381003: When trying to break a line after an image followed by some text, contrary to the expected behavior… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 | « no previous file | LayoutTests/editing/inserting/insert-paragraph-after-non-editable-node-before-text-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/inserting/insert-paragraph-after-non-editable-node-before-text.html
diff --git a/LayoutTests/editing/inserting/insert-paragraph-after-non-editable-node-before-text.html b/LayoutTests/editing/inserting/insert-paragraph-after-non-editable-node-before-text.html
new file mode 100644
index 0000000000000000000000000000000000000000..b368ee643a5e20867f1e1b410596234785ab7a86
--- /dev/null
+++ b/LayoutTests/editing/inserting/insert-paragraph-after-non-editable-node-before-text.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../resources/dump-as-markup.js"></script>
+<div contenteditable="true">
+<span id="imgTest">text1<img src="abe.png"/>text2</span>
+<br>
+<span id="inputTest">text1<input type="text"></input>text2</span>
+<br>
+<span id="objectTest">text1<object style="display: inline" border="1"></object>text2</span>
+</div>
+<script>
+Markup.description('Testcase for bug https://webkit.org/b/115023: Editing: wrong text position when you click enter on the text behind the image.\n'+
+'The test passes if "text2" appears on a new line with the caret placed at the beginning of that line.');
+
+Markup.waitUntilDone();
+
+var test = document.getElementById('imgTest');
+test.focus();
+var selection = window.getSelection();
+selection.collapse(test, test.childNodes.length - 1);
+document.execCommand("InsertParagraph");
+Markup.dump(test);
+
+test = document.getElementById('inputTest');
+test.focus();
+selection = window.getSelection();
+selection.collapse(test, test.childNodes.length - 1);
+document.execCommand("InsertParagraph");
+Markup.dump(test);
+
+test = document.getElementById('objectTest');
+test.focus();
+selection = window.getSelection();
+selection.collapse(test, test.childNodes.length - 1);
+document.execCommand("InsertParagraph");
+Markup.dump(test);
+
+Markup.notifyDone();
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/editing/inserting/insert-paragraph-after-non-editable-node-before-text-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698