tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / editing / pasteboard / contenteditable-pre-2.html
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>
10
11 Markup.description(document.getElementById('description').textContent);
12
13 var container = document.querySelector('div');
14 container.focus();
15 document.execCommand('selectAll', false, null);
16
17 Markup.dump(container, 'Before cut paste');
18
19 document.execCommand('cut', false, null);
20 document.execCommand('paste', false, null);
21
22 Markup.dump(container, 'After cut paste');
23
24 </script>
25 </body>
26 </html>