Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / format-block-from-range-selection.html
bloba2b3a191c18a4c77866f31a707a1e7edc69ac19f
1 <script src="../../resources/dump-as-markup.js"></script>
2 <div id="description">This test uses FormatBlock to apply the dl tag to a range of paragraphs with different block tags.</div>
3 <br>
4 <div id="test" style="border:1px solid black" contenteditable="true">
5 <pre id="start">Foo</pre>
6 <div>bar<br><span>baz</span><br>raz</div>
7 dar
8 <br>
9 <address id="end">yar</address>
10 </div>
12 <script>
13 var s = window.getSelection();
14 var start = document.getElementById("start").firstChild;
15 var end = document.getElementById("end").firstChild;
16 s.setBaseAndExtent(start, 2, end, 2);
18 Markup.description('This test uses FormatBlock to apply the dl tag to a range of paragraphs with different block tags.');
19 Markup.dump('test', 'before FormatBlock');
21 document.execCommand("FormatBlock", false, "dl");
23 Markup.dump('test', 'after FormatBlock');
24 </script>