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

Unified Diff: LayoutTests/editing/inserting/replace-in-paragraph-001.html

Issue 16001010: Make replacing selection in heading/paragraph with heading/paragraph to work (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-06-11T17:06 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
Index: LayoutTests/editing/inserting/replace-in-paragraph-001.html
diff --git a/LayoutTests/editing/inserting/replace-in-paragraph-001.html b/LayoutTests/editing/inserting/replace-in-paragraph-001.html
new file mode 100644
index 0000000000000000000000000000000000000000..75293e51416910b42289a81db38d5d2de560cb87
--- /dev/null
+++ b/LayoutTests/editing/inserting/replace-in-paragraph-001.html
@@ -0,0 +1,31 @@
+<script>
+function $(id) { return document.getElementById(id); }
+
+function testIt()
+{
+ description('Replace in pargraph by paragraph');
+
+ var selection = window.getSelection();
+ var range = document.createRange();
+ range.selectNodeContents($('destination'));
+ selection.addRange(range);
+ document.execCommand('insertHTML', false, '<p>source</p>');
+ shouldBeEqualToString('$("destination").textContent', 'source');
+
+ if (window.testRunner)
+ $('content').outerHTML = '';
+}
+</script>
+</head>
+<body>
+<div id="content">
+<p id="description"></p>
+<p contenteditable="true" id="destination">destination</p>
+</div>
+<div id="console"></div>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script>
+testIt();
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698