Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / interchange-newline-4.html
blob352c2528fbfbcd0ed7cd71555df7c354f35065dc
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 tests for a bug where pasted content starting with an interchange newline would end up\n"
12 + "outside of the editable region where it was pasted. You should see 'foo\\nbar' below.");
14 var sel = window.getSelection();
15 var e = document.getElementById("test");
17 sel.collapse(e, 0);
18 sel.modify("move", "forward", "word");
19 document.execCommand("InsertHTML", false, "<br class='Apple-interchange-newline'>bar");
21 Markup.dump(document.body);
24 </script>
25 </head>
26 <body>
27 <div id="test" contenteditable="true">foo</div>
28 non-editable
29 <script>
30 runTest();
31 </script>
32 </body>
33 </html>