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

Unified Diff: LayoutTests/editing/inserting/replace-in-heading-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
« no previous file with comments | « no previous file | LayoutTests/editing/inserting/replace-in-heading-001-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/inserting/replace-in-heading-001.html
diff --git a/LayoutTests/editing/inserting/replace-in-heading-001.html b/LayoutTests/editing/inserting/replace-in-heading-001.html
new file mode 100644
index 0000000000000000000000000000000000000000..b343aab5e379d5a02cde8176044c39e985c3a810
--- /dev/null
+++ b/LayoutTests/editing/inserting/replace-in-heading-001.html
@@ -0,0 +1,31 @@
+<script>
+function $(id) { return document.getElementById(id); }
+
+function testIt()
+{
+ description('Replace in heading by heading');
+
+ var selection = window.getSelection();
+ var range = document.createRange();
+ range.selectNodeContents($('destination'));
+ selection.addRange(range);
+ document.execCommand('insertHTML', false, '<h2>source</h2>');
+ shouldBeEqualToString('$("destination").textContent', 'source');
+
+ if (window.testRunner)
+ $('content').outerHTML = '';
+}
+</script>
+</head>
+<body>
+<div id="content">
+<p id="description"></p>
+<h1 contenteditable="true" id="destination">destination</h1>
+</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>
« no previous file with comments | « no previous file | LayoutTests/editing/inserting/replace-in-heading-001-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698