Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / contenteditable-pre-2.html
blob5c37b4a8e47e4a4891d25a19ff5bd6d8502347ae
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p id="description">This test copies and pastes content inside pre that is an editing host. WebKit should not clone pre.
5 To manually test, cut and paste "hello\nworld" WebKit should not nest pre (no red borders).</p>
6 <style> body > *[contenteditable] {border: solid 2px blue;} pre > pre, div > pre {border: solid 2px red;} </style>
7 <div contenteditable><pre>hello<br>world</pre></div>
8 <script src="../../resources/dump-as-markup.js"></script>
9 <script>
11 Markup.description(document.getElementById('description').textContent);
13 var container = document.querySelector('div');
14 container.focus();
15 document.execCommand('selectAll', false, null);
17 Markup.dump(container, 'Before cut paste');
19 document.execCommand('cut', false, null);
20 document.execCommand('paste', false, null);
22 Markup.dump(container, 'After cut paste');
24 </script>
25 </body>
26 </html>