| OLD | NEW |
| 1 <html> | 1 <!doctype html> |
| 2 <head> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <script src="../assert_selection.js"></script> |
| 3 <script> | 5 <script> |
| 4 if (window.testRunner) | 6 test(() => assert_selection( |
| 5 testRunner.dumpEditingCallbacks(); | 7 [ |
| 8 '<div contenteditable>', |
| 9 '^abc', |
| 10 '<div contenteditable="false">', |
| 11 'def', |
| 12 '<div contenteditable>xyz</div>', |
| 13 'ghi', |
| 14 '</div>', |
| 15 'def|', |
| 16 '</div>', |
| 17 ].join(''), |
| 18 'bold', |
| 19 [ |
| 20 '<div contenteditable>', |
| 21 '<b>^abc</b>', |
| 22 '<div contenteditable="false">', |
| 23 'def', |
| 24 '<div contenteditable><b>xyz</b></div>', |
| 25 'ghi', |
| 26 '</div>', |
| 27 '<b>def|</b>', |
| 28 '</div>', |
| 29 ].join('')), |
| 30 'Apply style to mixed editable contents'); |
| 6 </script> | 31 </script> |
| 7 | |
| 8 <script> | |
| 9 function test() | |
| 10 { | |
| 11 var tbl1 = document.getElementById('tbl1'); | |
| 12 var tbl2 = document.getElementById('tbl2'); | |
| 13 var selection = window.getSelection(); | |
| 14 selectAllCommand(); | |
| 15 boldCommand(); | |
| 16 } | |
| 17 </script> | |
| 18 <script src=../editing.js language="JavaScript" type="text/JavaScript" >
</script> | |
| 19 </head> | |
| 20 <body onload="test()" contenteditable> | |
| 21 <table id="tbl1" contenteditable=false> | |
| 22 <tr> | |
| 23 <td>This tests that a style can be applied to a selection that conta
ins both editable and non-editable content. | |
| 24 </td> | |
| 25 <td> | |
| 26 <span contenteditable>Editable - line 1</span> | |
| 27 </td> | |
| 28 </tr> | |
| 29 </table> | |
| 30 <table id="tbl2" contenteditable=false> | |
| 31 <tr> | |
| 32 <td>The test passes if the editable content is bold, and the non edi
table content remains unchanged. | |
| 33 </td> | |
| 34 <td> | |
| 35 <span contenteditable>Editable - line 2</span> | |
| 36 </td> | |
| 37 </tr> | |
| 38 </table> | |
| 39 </body> | |
| 40 </html> | |
| OLD | NEW |