| <html> |
| <head> |
| <style> |
| .editing { |
| border: 2px solid red; |
| font-size: 24px; |
| } |
| .explanation { |
| border: 2px solid blue; |
| padding: 12px; |
| font-size: 24px; |
| margin-bottom: 24px; |
| } |
| .scenario { margin-bottom: 16px;} |
| .scenario:first-line { font-weight: bold; margin-bottom: 16px;} |
| .expected-results:first-line { font-weight: bold } |
| </style> |
| <script src="../editing.js"></script> |
| <script src="../../resources/dump-as-markup.js"></script> |
| <title>Editing Test</title> |
| </head> |
| <body> |
| <p id="description">When copying some text, under certain circumstances, empty style (or font) tags are created. This test checks that there is no empty <font> tag after 'foo' and before 'bar'.</p> |
| <div contenteditable id="root"> |
| <div id="test" class="editing"> |
| foo |
| <div style="color: rgb(255, 0, 0);" > |
| <div>bar</div> |
| </div> |
| </div> |
| </div> |
| <script> |
| |
| Markup.description(document.getElementById('description').textContent); |
| |
| setSelectionCommand(document.getElementById("test"),0,document.getElementById("test"),5); |
| copyCommand(); |
| Markup.dump('root', 'After copy'); |
| |
| pasteCommand(); |
| Markup.dump('root', 'After paste'); |
| |
| </script> |
| </body> |
| </html> |