Ticket #31441: 31441.17.patch
File 31441.17.patch, 2.9 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/press-this.css
846 846 border-bottom: 1px solid #e5e5e5; 847 847 font-size: 14px; 848 848 -webkit-appearance: none; 849 -moz-appearance: none; 849 850 appearance: none; 850 851 } 851 852 -
tests/qunit/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js
1 1 ( function( $, QUnit, tinymce, _type, setTimeout ) { 2 var editor; 2 var editor, 3 count = 0; 3 4 4 5 if ( tinymce.Env.ie && tinymce.Env.ie < 9 ) { 5 6 return; … … 31 32 32 33 QUnit.module( 'tinymce.plugins.wptextpattern', { 33 34 beforeEach: function( assert ) { 34 var done = assert.async();35 var done; 35 36 36 $( '#qunit-fixture' ).append( '<textarea id="editor">' ); 37 if ( ! editor ) { 38 done = assert.async(); 37 39 38 tinymce.init( { 39 selector: '#editor', 40 plugins: 'wptextpattern', 41 init_instance_callback: function() { 42 editor = arguments[0]; 43 editor.focus(); 44 editor.selection.setCursorLocation(); 45 setTimeout( done ); 46 } 47 } ); 40 $( document.body ).append( '<textarea id="editor">' ); 41 42 tinymce.init( { 43 selector: '#editor', 44 skin: false, 45 plugins: 'wptextpattern', 46 init_instance_callback: function() { 47 editor = arguments[0]; 48 editor.focus(); 49 editor.selection.setCursorLocation(); 50 done(); 51 } 52 } ); 53 } else { 54 editor.setContent( '' ); 55 editor.selection.setCursorLocation(); 56 } 48 57 }, 49 afterEach: function() { 50 editor.remove(); 58 afterEach: function( assert ) { 59 count++; 60 61 if ( count === assert.test.module.tests.length ) { 62 editor.remove(); 63 $( '#editor' ).remove(); 64 } 51 65 } 52 66 } ); 53 67 54 68 QUnit.test( 'Unordered list.', function( assert ) { 55 type( '* test', function() {56 assert.equal( editor.getContent(), '<ul>\n<li> test</li>\n</ul>' );69 type( '* a', function() { 70 assert.equal( editor.getContent(), '<ul>\n<li>a</li>\n</ul>' ); 57 71 }, assert.async() ); 58 72 } ); 59 73 60 74 QUnit.test( 'Ordered list.', function( assert ) { 61 type( '1. test', function() {62 assert.equal( editor.getContent(), '<ol>\n<li> test</li>\n</ol>' );75 type( '1. a', function() { 76 assert.equal( editor.getContent(), '<ol>\n<li>a</li>\n</ol>' ); 63 77 }, assert.async() ); 64 78 } ); 65 79 … … 94 108 editor.setContent( '<p>* test</p>' ); 95 109 editor.selection.setCursorLocation( editor.$( 'p' )[0].firstChild, 6 ); 96 110 97 type( ' test', function() {98 assert.equal( editor.getContent(), '<p>* test test</p>' );111 type( ' a', function() { 112 assert.equal( editor.getContent(), '<p>* test a</p>' ); 99 113 }, assert.async() ); 100 114 } ); 101 115