OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <p id="description">This tests copying and pasting text does not strip inline st
yles that overrides UA style rules. | 4 <p id="description">This tests copying and pasting text does not strip inline st
yles that overrides UA style rules. |
5 To manually test, copy and paste "hello world" below. The pasted text should be
bolded.</p> | 5 To manually test, copy and paste "hello world" below. The pasted text should be
bolded.</p> |
6 <div id="test" contenteditable><b style="font-weight: normal">hello world</b></d
iv> | 6 <div id="test" contenteditable><b style="font-weight: normal">hello world</b></d
iv> |
7 <script src="../../resources/dump-as-markup.js"></script> | 7 <script src="../../resources/dump-as-markup.js"></script> |
8 <script> | 8 <script> |
9 if (window.layoutTestController) | 9 if (window.layoutTestController) |
10 layoutTestController.dumpAsText(); | 10 layoutTestController.dumpAsText(); |
11 | 11 |
12 Markup.description(document.getElementById('description').textContent); | 12 Markup.description(document.getElementById('description').textContent); |
13 | 13 |
14 document.getElementById('test').focus(); | 14 document.getElementById('test').focus(); |
15 | 15 |
16 Markup.dump('test', 'Before copy-paste'); | 16 Markup.dump('test', 'Before copy-paste'); |
17 document.execCommand('SelectAll', false, null); | 17 document.execCommand('SelectAll', false, null); |
18 document.execCommand('Copy', false, null); | 18 document.execCommand('Copy', false, null); |
19 document.execCommand('Paste', false, null); | 19 document.execCommand('Paste', false, null); |
20 Markup.dump('test', 'After copy-paste'); | 20 Markup.dump('test', 'After copy-paste'); |
21 | 21 |
22 </script> | 22 </script> |
23 </body> | 23 </body> |
24 </html> | 24 </html> |
OLD | NEW |