| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <script src="../../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <script src="../assert_selection.js"></script> | 4 <script src="../assert_selection.js"></script> |
| 5 <script> | 5 <script> |
| 6 test(() => assert_selection( | 6 test(() => assert_selection( |
| 7 [ | 7 [ |
| 8 '<div contenteditable>', | 8 '<div contenteditable>', |
| 9 '^abc <span contenteditable="false">def</span> ghi|', | 9 '^abc <span contenteditable="false">def</span> ghi|', |
| 10 '</div>', | 10 '</div>', |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 '^abc <span contenteditable="false">def</span> ghi|', | 42 '^abc <span contenteditable="false">def</span> ghi|', |
| 43 '</div>', | 43 '</div>', |
| 44 ].join(''), | 44 ].join(''), |
| 45 selection => { | 45 selection => { |
| 46 selection.document.execCommand('bold'); | 46 selection.document.execCommand('bold'); |
| 47 selection.document.execCommand('italic'); | 47 selection.document.execCommand('italic'); |
| 48 selection.document.execCommand('bold'); | 48 selection.document.execCommand('bold'); |
| 49 }, | 49 }, |
| 50 [ | 50 [ |
| 51 '<div contenteditable>', | 51 '<div contenteditable>', |
| 52 '<i>^abc </i>', | 52 '<i style>^abc </i>', |
| 53 '<span contenteditable="false">def</span>', | 53 '<span contenteditable="false">def</span>', |
| 54 '<i> ghi|</i>', | 54 '<i style> ghi|</i>', |
| 55 '</div>', | 55 '</div>', |
| 56 ].join('')), | 56 ].join('')), |
| 57 'bold+italic+bold'); | 57 'bold+italic+bold'); |
| 58 | 58 |
| 59 test(() => assert_selection( | 59 test(() => assert_selection( |
| 60 [ | 60 [ |
| 61 '<div contenteditable>', | 61 '<div contenteditable>', |
| 62 '^abc <span contenteditable="false">def</span> ghi|', | 62 '^abc <span contenteditable="false">def</span> ghi|', |
| 63 '</div>', | 63 '</div>', |
| 64 ].join(''), | 64 ].join(''), |
| 65 selection => { | 65 selection => { |
| 66 selection.document.execCommand('bold'); | 66 selection.document.execCommand('bold'); |
| 67 selection.document.execCommand('italic'); | 67 selection.document.execCommand('italic'); |
| 68 selection.document.execCommand('bold'); | 68 selection.document.execCommand('bold'); |
| 69 selection.document.execCommand('italic'); | 69 selection.document.execCommand('italic'); |
| 70 }, | 70 }, |
| 71 [ | 71 [ |
| 72 '<div contenteditable>', | 72 '<div contenteditable>', |
| 73 '^abc <span contenteditable="false">def</span> ghi|', | 73 '^abc <span contenteditable="false">def</span> ghi|', |
| 74 '</div>', | 74 '</div>', |
| 75 ].join('')), | 75 ].join('')), |
| 76 'bold+italic+bold+italic'); | 76 'bold+italic+bold+italic'); |
| 77 </script> | 77 </script> |
| OLD | NEW |