Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / paste-text-with-style-2.html
bloba44a8a801836a11e5a4e88288050b70eb2cbeaa4
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p id="description">This tests copying and pasting text does not result in nested style elements such as b, em, and font.
5 To manually test, copy and paste "hello world" below. WebKit should not nest b, i, u, and font.</p>
6 <div id="test" contenteditable><b><i><u><font color="red">hello world</font></u></i></b></div>
7 <script src="../../resources/dump-as-markup.js"></script>
8 <script>
9 if (window.testRunner)
10 testRunner.dumpAsText();
12 Markup.description(document.getElementById('description').textContent);
14 document.getElementById('test').focus();
16 Markup.dump('test', 'Before copy-paste');
17 document.execCommand('SelectAll', false, null);
18 document.execCommand('Copy', false, null);
19 document.execCommand('Paste', false, null);
20 Markup.dump('test', 'After copy-paste');
22 </script>
23 </body>
24 </html>