OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>InputEvent: execCommand test</title> | 4 <title>InputEvent: execCommand test</title> |
5 <script src="../../../resources/testharness.js"></script> | 5 <script src="../../../resources/testharness.js"></script> |
6 <script src="../../../resources/testharnessreport.js"></script> | 6 <script src="../../../resources/testharnessreport.js"></script> |
7 </head> | 7 </head> |
8 <body> | 8 <body> |
9 <p id="txt" contenteditable></p> | 9 <p id="txt" contenteditable></p> |
10 <script> | 10 <script> |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 selection.extend(txt, 1); | 76 selection.extend(txt, 1); |
77 testExecCommandInputType('removeFormat', null, 'removeFormat'); | 77 testExecCommandInputType('removeFormat', null, 'removeFormat'); |
78 assert_equals(txt.innerHTML, '<div>abc</div>'); | 78 assert_equals(txt.innerHTML, '<div>abc</div>'); |
79 testExecCommandInputType('indent', null, 'indent'); | 79 testExecCommandInputType('indent', null, 'indent'); |
80 testExecCommandInputType('outdent', null, 'outdent'); | 80 testExecCommandInputType('outdent', null, 'outdent'); |
81 assert_equals(txt.innerHTML, '<div>abc</div>'); | 81 assert_equals(txt.innerHTML, '<div>abc</div>'); |
82 | 82 |
83 // Copy shouldn't fire 'input'. | 83 // Copy shouldn't fire 'input'. |
84 testExecCommandInputType('copy', null, NO_INPUT_EVENT_FIRED); | 84 testExecCommandInputType('copy', null, NO_INPUT_EVENT_FIRED); |
85 // Cut/Paste should fire 'input'. | 85 // Cut/Paste should fire 'input'. |
86 testExecCommandInputType('cut', null, 'cut'); | 86 testExecCommandInputType('cut', null, 'deleteByCut'); |
87 testExecCommandInputType('paste', null, 'paste'); | 87 testExecCommandInputType('paste', null, 'insertFromPaste'); |
88 }, 'Testing input with execCommand'); | 88 }, 'Testing input with execCommand'); |
89 </script> | 89 </script> |
90 </body> | 90 </body> |
91 </html> | 91 </html> |
OLD | NEW |