- Timestamp:
- 06/09/2016 07:06:25 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/qunit/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js
r37080 r37668 7 7 } 8 8 9 function mceType( chr) {9 function mceType( chr, noKeyUp ) { 10 10 var editor = tinymce.activeEditor, keyCode, charCode, evt, startElm, rng, startContainer, startOffset, textNode; 11 11 … … 110 110 } 111 111 112 fakeEvent(startElm, 'keyup', evt); 112 if ( ! noKeyUp ) { 113 fakeEvent(startElm, 'keyup', evt); 114 } 113 115 } 114 116 … … 116 118 var args = arguments; 117 119 120 // Wait once for conversions to be triggered, 121 // and once for the `canUndo` flag to be set. 122 setTimeout( function() { 118 123 setTimeout( function() { 119 124 if ( typeof args[0] === 'string' ) { … … 134 139 type.apply( null, args ); 135 140 } 141 } ); 136 142 } ); 137 143 } … … 178 184 } ); 179 185 186 QUnit.test( 'Unordered list. (fast)', function( assert ) { 187 type( '*', function() { 188 mceType( ' ', true ); 189 }, 'a', function() { 190 assert.equal( editor.getContent(), '<ul>\n<li>a</li>\n</ul>' ); 191 }, assert.async() ); 192 } ); 193 180 194 QUnit.test( 'Ordered list.', function( assert ) { 181 195 type( '1. a', function() {
Note: See TracChangeset
for help on using the changeset viewer.