2 <div id=
"description">This tests deleting a selection that has a styling element in it. Should move styling elements to head to prevent style loss.
</div>
3 <div id=
"rootEditableElement" contentEditable=
"true">
4 <div> hide styling elements in -->
</div>
5 <style> .text { color:red; }
</style>
6 <link rel=
"stylesheet" type=
"text/css" href=
"../editingStyle.css" />
7 <div class =
"text"> between
</div>
9 <script src=
"../../resources/dump-as-markup.js"></script>
11 Markup
.description(document
.getElementById('description').textContent
);
12 document
.getElementById('rootEditableElement').focus();
13 document
.execCommand("SelectAll");
14 document
.execCommand("Delete");
15 Markup
.dump('rootEditableElement', 'styling elements have been moved');
16 document
.execCommand("Undo");
17 Markup
.dump('rootEditableElement', 'styling elements are back to their original place');