Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / pasteboard / paste-wrapped-blockquote-into-nonblockquote.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 blockquote {
6     color: blue;
7     border-left: 2px solid blue;
8     margin: 0px;
9     padding: 0 0 0 20px;
10 }
11 </style>
12 </head>
13 <body>
14 <div id="pasteDiv" contenteditable="true"></div>
15 <div id="copyDiv"><blockquote type='cite'><div>line 1</div><div>line 2</div></blockquote></div>
16 <div>line 3</div>
17 </body>
18 <script src="../../resources/dump-as-markup.js"></script>
19 <script>
20 var range = document.createRange();
21 var nodeToCopy = document.getElementById("copyDiv");
22 range.setStartBefore(nodeToCopy);
23 range.setEndAfter(nodeToCopy);
24 var selection = window.getSelection();
25 selection.addRange(range);
26 document.execCommand("Copy");
27
28 var pasteNode = document.getElementById("pasteDiv");
29 selection.collapse(pasteNode, 0);
30 document.execCommand("Paste");
31 Markup.description("This test ensures the copied the newline is NOT inside the blockquote -- a '<div><div><br></div></div>' should be appended as the next sibling of the blockquote. \n");
32 Markup.dump('pasteDiv');
33 </script>
34 </html>