OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <style type="text/css"> |
| 5 .styleToMerge { |
| 6 color: red; |
| 7 font-size: 10px; |
| 8 } |
| 9 </style> |
| 10 </head> |
| 11 <body> |
| 12 <div id="test" contenteditable="true"> |
| 13 <div>foo</div> |
| 14 <div id="divToMerge" class="styleToMerge" style="color:green;font-size:20px">bar
</div> |
| 15 </div> |
| 16 <script src="../../resources/dump-as-markup.js"></script> |
| 17 <script> |
| 18 Markup.description('The inline style should be applied when merging div element.
\n' |
| 19 + 'The test passes if "bar" has the green color and 20px font-size.'); |
| 20 |
| 21 var divToMerge = document.getElementById("divToMerge"); |
| 22 divToMerge.focus(); |
| 23 getSelection().collapse(divToMerge, 0); |
| 24 document.execCommand("Delete"); |
| 25 Markup.dump(document.getElementById("test")); |
| 26 </script> |
| 27 </body> |
| 28 </html> |
OLD | NEW |