Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / format-block-table.html
blob28ba100e4ed57d7dd3e88a86eb66cd4a147e3211
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../resources/dump-as-markup.js"></script>
5 <div id="test0" contenteditable>
6 <table><tr><td>hello</td><td>world</td></tr></table>
7 </div>
8 <div id="test1" contenteditable>
9 <table><tr><td>hello</td><td>world</td></tr></table>
10 </div>
11 <div id="test2" contenteditable>
12 <table><tr><td><p>hello</p><div>world</div></td><td>WebKit</td></tr></table>
13 </div>
14 <div id="test3" contenteditable>
15 <table><tr><td><ul><li>hello</li><li>world</li></ul></td><td>WebKit</td></tr></table>
16 </div>
17 <script>
19 function testIndentation(containerId, selector, value) {
20 var container = document.getElementById(containerId);
21 selector(container);
22 Markup.dump(container, 'Formatting');
23 document.execCommand('FormatBlock', false, value);
24 Markup.dump(container, 'by ' + value + ' yields');
27 function selectAll(container) {
28 window.getSelection().selectAllChildren(container);
31 function selectFirstCell(container) {
32 window.getSelection().selectAllChildren(container.getElementsByTagName('td')[0]);
35 testIndentation('test0', selectAll, 'p');
36 testIndentation('test1', selectFirstCell, 'blockquote');
37 testIndentation('test2', selectFirstCell, 'h3');
38 testIndentation('test3', selectFirstCell, 'address');
40 </script>
41 </body>
42 </html>