blob: c7471c4b1a8ca71fe838b93b44cf56eab40c1665 [file] [log] [blame]
g.czajkowski@samsung.comd085a812013-06-20 07:39:43 +00001<!DOCTYPE html>
2<html>
3<head>
4<style type="text/css">
5.NonInheritableProperties {
6background-color: yellow;
7text-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>
18Markup.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
21var spanToMerge = document.getElementById("spanToMerge");
22spanToMerge.focus();
23getSelection().collapse(spanToMerge, 0);
24document.execCommand("Delete");
25Markup.dump(document.getElementById("test"));
26</script>
27 </body>
28</html>