Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / interchange-newline-3.html
blobccf443e829c4995a288f303634f5ede593b0ab8d
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/dump-as-markup.js"></script>
5 <script>
7 if (window.testRunner)
8 testRunner.dumpEditingCallbacks();
10 function runTest() {
11 Markup.description('This demonstrates a bug in interchange newline handling during paste.\n'
12 + 'There is an interchange newline at the end of the incoming fragment and so the caret should end up on an empty line.\n'
13 + 'The editable region is followed by non-editable content, which breaks the old code in paste that handled interchange newlines.');
15 var s = window.getSelection();
16 var e = document.getElementById("test");
18 s.collapse(e, 0);
19 document.execCommand("InsertHTML", false, "foo<div>bar</div><br class='Apple-interchange-newline'>");
21 Markup.dump(document.body);
24 </script>
25 </head>
26 <body>
27 <div id="test" contenteditable="true"></div>
28 This is non-editable content.
30 <script>
31 runTest();
32 </script>
33 </body>
34 </html>