g.czajkowski@samsung.com | d085a81 | 2013-06-20 07:39:43 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <style type="text/css"> |
| 5 | .NonInheritableProperties { |
| 6 | background-color: yellow; |
| 7 | text-decoration: underline; |
| 8 | } |
| 9 | </style> |
| 10 | </head> |
| 11 | <body> |
| 12 | <div id="test" contenteditable="true"> |
| 13 | <div>foo</div> |
| 14 | <span id="spanToMerge" class="NonInheritableProperties">bar</span> |
| 15 | </div> |
| 16 | <script src="../../resources/dump-as-markup.js"></script> |
| 17 | <script> |
| 18 | Markup.description('The span style should be preserved when merging div element.\n' |
| 19 | + 'The test passes if "bar" contatins the yellow background and it\'s underlined.'); |
| 20 | |
| 21 | var spanToMerge = document.getElementById("spanToMerge"); |
| 22 | spanToMerge.focus(); |
| 23 | getSelection().collapse(spanToMerge, 0); |
| 24 | document.execCommand("Delete"); |
| 25 | Markup.dump(document.getElementById("test")); |
| 26 | </script> |
| 27 | </body> |
| 28 | </html> |