Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / remove-formatting-2.html
blobe8503693d31600368527bf8c929236e37f8842b5
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../resources/dump-as-markup.js"></script>
5 <div id="div" contenteditable="true"><b>This</b> text should look the same as the text above.</div>
6 <script>
8 if (window.testRunner)
9 testRunner.dumpEditingCallbacks();
11 if (window.internals)
12 internals.settings.setEditingBehavior('mac');
14 var sel = window.getSelection();
15 var div = document.getElementById("div");
17 sel.collapse(div, 0);
19 sel.modify("extend", "forward", "word");
20 document.execCommand("RemoveFormat");
22 Markup.description("This tests that RemoveFormat not only removes style from the selected part of the DOM, but that it also applies the document default style to the selection if that's necessary in order to leave the selected text unstyled.");
23 Markup.dump(div);
25 </script>
26 </body>
27 </html>