Ticket #31596: 31596.patch
File 31596.patch, 27.0 KB (added by , 10 years ago) |
---|
-
tests/qunit/editor/index.html
1 1 <!DOCTYPE html> 2 2 <html> 3 3 <head> 4 <title>WordPress TinyMCE QUnit tests</title> 5 4 6 <meta charset="UTF-8" /> 5 <title>TinyMCE QUnit tests</title>6 7 <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 7 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />8 <link rel="stylesheet" href="js/qunit/qunit.css" type="text/css" />9 <link rel="stylesheet" href="../../../src/wp-includes/js/tinymce/skins/lightgray/skin.min.css" type="text/css" />10 <link rel="stylesheet" href="tinymce/ui/css/ui-overrides.css" type="text/css" />11 <style>12 #qunit-modulefilter-container { float: none; }13 </style>14 </head>15 <body>16 <div id="qunit"></div>17 <div id="qunit-fixture"></div>18 <div id="view" style="position: absolute; right: 0; top: 0"></div>19 8 20 <script src="http://www.google.com/jsapi"></script> 21 <script>google.load("jquery", "1");</script> 22 <script src="js/qunit/qunit.js"></script> 23 <script src="../../../build/wp-includes/js/tinymce/tinymce.min.js"></script> 24 <!--<script src="../js/tinymce/classes/jquery.tinymce.js"></script> --> 25 <script src="js/utils.js"></script> 26 <script src="js/init.js"></script> 9 <link rel="stylesheet" href="../vendor/qunit.css" type="text/css" /> 10 <script src="../vendor/qunit.js"></script> 11 12 <script src="../../../src/wp-includes/js/tinymce/tinymce.js"></script> 27 13 28 14 <script> 29 var wpPlugins = 'charmap colorpicker hr lists media paste tabfocus textcolor ' + 30 'fullscreen wordpress wpautoresize wpeditimage wpgallery wplink wpdialogs wpview'; 15 ( function( window, tinymce ) { 16 var init = tinymce.EditorManager.init; 17 18 tinymce.EditorManager.init = function() { 19 arguments[0] = arguments[0] || {}; 20 21 if ( ( ' ' + arguments[0].plugins + ' ' ).indexOf( ' noneditable ' ) >= 0 ) { 22 arguments[0].external_plugins = { 23 noneditable: '../../../../tests/qunit/editor/external-plugins/noneditable/plugin.js' 24 }; 25 } 26 27 arguments[0].plugins = [ 28 'charmap', 29 'colorpicker', 30 'hr', 31 'lists', 32 'media', 33 'paste', 34 'tabfocus', 35 'textcolor', 36 'fullscreen', 37 'wordpress', 38 'wpautoresize', 39 'wpeditimage', 40 'wpgallery', 41 'wplink', 42 'wpdialogs', 43 'wpview' 44 ]; 31 45 32 getUserSetting = setUserSetting = function() {} 46 init.apply( this, arguments ); 47 }; 48 49 window.getUserSetting = window.setUserSetting = function() {}; 50 } )( window, window.tinymce ); 33 51 </script> 34 52 35 <!-- tinymce.dom.* --> 36 <script src="tinymce/dom/DomQuery.js"></script> 37 <script src="tinymce/dom/DOMUtils.js"></script> 38 <script src="tinymce/dom/EventUtils.js"></script> 39 <script src="tinymce/dom/Range.js"></script> 53 <script src="js/utils.js"></script> 54 <script src="js/init.js"></script> 55 40 56 <script src="tinymce/dom/Selection.js"></script> 41 <script src="tinymce/dom/Serializer.js"></script>42 57 <script src="tinymce/dom/TridentSelection.js"></script> 43 44 <!-- tinymce.html.* -->45 <script src="tinymce/html/DomParser.js"></script>46 <script src="tinymce/html/Entities.js"></script>47 <script src="tinymce/html/Node.js"></script>48 <script src="tinymce/html/SaxParser.js"></script>49 <script src="tinymce/html/Schema.js"></script>50 <script src="tinymce/html/Obsolete.js"></script>51 <script src="tinymce/html/Styles.js"></script>52 <script src="tinymce/html/Writer.js"></script>53 54 <!-- tnymce.ui.* -->55 <script src="tinymce/ui/AbsoluteLayout.js"></script>56 <script src="tinymce/ui/Button.js"></script>57 <script src="tinymce/ui/Collection.js"></script>58 <script src="tinymce/ui/ColorButton.js"></script>59 <script src="tinymce/ui/Control.js"></script>60 <script src="tinymce/ui/FitLayout.js"></script>61 <script src="tinymce/ui/FlexLayout.js"></script>62 <script src="tinymce/ui/GridLayout.js"></script>63 <script src="tinymce/ui/MenuButton.js"></script>64 <script src="tinymce/ui/Panel.js"></script>65 <script src="tinymce/ui/Selector.js"></script>66 <script src="tinymce/ui/SplitButton.js"></script>67 <script src="tinymce/ui/TabPanel.js"></script>68 <script src="tinymce/ui/TextBox.js"></script>69 <script src="tinymce/ui/Window.js"></script>70 71 <!-- tinymce.util.* -->72 <script src="tinymce/util/Color.js"></script>73 <script src="tinymce/util/EventDispatcher.js"></script>74 <script src="tinymce/util/JSON.js"></script>75 <script src="tinymce/util/JSONRequest.js"></script>76 <script src="tinymce/util/LocalStorage.js"></script>77 <script src="tinymce/util/Observable.js"></script>78 58 <script src="tinymce/util/Quirks_webkit.js"></script> 79 <script src="tinymce/util/URI.js"></script>80 <script src="tinymce/util/XHR.js"></script>81 <script src="tinymce/util/I18n.js"></script>82 59 83 <!-- tinymce.* -->84 <script src="tinymce/AddOnManager.js"></script>85 60 <script src="tinymce/Editor.js"></script> 86 61 <script src="tinymce/EditorCommands.js"></script> 87 62 <script src="tinymce/EditorManager.js"></script> … … 93 68 <script src="tinymce/Shortcuts.js"></script> 94 69 <script src="tinymce/UndoManager.js"></script> 95 70 96 <!-- tinymce.plugins.* -->97 <!--<script src="plugins/autolink.js"></script>98 <script src="plugins/autosave.js"></script>99 <script src="plugins/fullpage.js"></script> -->100 71 <script src="plugins/image.js"></script> 101 <!--<script src="plugins/importcss.js"></script> 102 <script src="plugins/jquery_plugin.js"></script> 103 <script src="plugins/jquery_initialization.js"></script> 104 <script src="plugins/legacyoutput.js"></script> 105 <script src="plugins/link.js"></script> 106 <script src="plugins/lists.js"></script>--> 72 <script src="plugins/lists.js"></script> 107 73 <script src="plugins/media.js"></script> 108 <!--<script src="plugins/noneditable.js"></script> -->109 74 <script src="plugins/paste.js"></script> 110 < !--<script src="plugins/searchreplace.js"></script>111 <script src="plugins/spellchecker.js"></script>112 < script src="plugins/table.js"></script>113 < script src="plugins/textpattern.js"></script>114 < script src="plugins/wordcount.js"></script>-->75 </head> 76 <body> 77 <div id="qunit"></div> 78 <div id="qunit-fixture"></div> 79 <div id="view" style="position: absolute; right: 0; top: 0"></div> 115 80 </body> 116 81 </html> -
tests/qunit/editor/plugins/lists.js
16 16 17 17 tinymce.init({ 18 18 selector: '#elm1', 19 plugins: wpPlugins,19 plugins: "lists", 20 20 add_unload_trigger: false, 21 21 skin: false, 22 22 indent: false, -
tests/qunit/editor/plugins/media.js
6 6 selector: "textarea", 7 7 add_unload_trigger: false, 8 8 skin: false, 9 plugins: wpPlugins,9 plugins: 'media', 10 10 document_base_url: '/tinymce/tinymce/trunk/tests/', 11 11 media_scripts: [ 12 12 {filter: 'http://media1.tinymce.com'}, -
tests/qunit/editor/plugins/paste.js
7 7 add_unload_trigger: false, 8 8 skin: false, 9 9 indent: false, 10 plugins: wpPlugins, 11 wp_paste_filters: false, 10 plugins: 'paste', 12 11 setup: function(ed) { 13 12 ed.on('NodeChange', false); 14 13 }, … … 52 51 editor.selection.setRng(rng); 53 52 54 53 editor.execCommand('mceInsertClipboardContent', false, {content: '<strong><em><span style="color: red;">TEST</span></em></strong>'}); 55 equal(editor.getContent(), '<p>1<strong><em><span style="color: red;">TEST</span></em></strong>4</p>'); // Changed in WordPress54 equal(editor.getContent(), '<p>1<strong><em><span style="color: red;">TEST</span></em></strong>4</p>'); 56 55 }); 57 56 58 57 test("Paste paragraph in paragraph", function() { … … 713 712 editor.execCommand('mceInsertClipboardContent', false, {content: '<span style="font-size:42px; text-indent: 10px">Test</span>'}); 714 713 equal(editor.getContent(), '<p><span style="font-size: 42px;">Test</span></p>'); 715 714 }); 716 /* WP set to always remove font-family on WebKit with a filtering callback. 715 717 716 test('paste webkit remove runtime styles (font-family)', function() { 718 717 editor.settings.paste_webkit_styles = 'font-family'; 719 718 editor.setContent(''); 720 719 editor.execCommand('mceInsertClipboardContent', false, {content: '<span style="font-family:Arial; text-indent: 10px">Test</span>'}); 721 720 equal(editor.getContent(), '<p><span style="font-family: Arial;">Test</span></p>'); 722 721 }); 723 WP end */ 722 724 723 test('paste webkit remove runtime styles font-family allowed but not specified', function() { 725 724 editor.settings.paste_webkit_styles = 'font-family'; 726 725 editor.setContent(''); -
tests/qunit/editor/tinymce/Editor.js
5 5 6 6 tinymce.init({ 7 7 selector: "#elm1", 8 plugins: wpPlugins,9 8 add_unload_trigger: false, 10 9 disable_nodechange: true, 11 10 skin: false, … … 27 26 28 27 tinymce.init({ 29 28 selector: "#elm2", 30 plugins: wpPlugins,31 29 add_unload_trigger: false, 32 30 disable_nodechange: true, 33 31 skin: false, … … 309 307 310 308 tinymce.init({ 311 309 selector: "#elmx", 312 plugins: wpPlugins,313 310 add_unload_trigger: false, 314 311 disable_nodechange: true, 315 312 skin: false, -
tests/qunit/editor/tinymce/EditorCommands.js
4 4 5 5 tinymce.init({ 6 6 selector: "textarea", 7 plugins: wpPlugins,8 7 add_unload_trigger: false, 9 8 disable_nodechange: true, 10 9 indent: false, -
tests/qunit/editor/tinymce/EditorManager.js
4 4 5 5 tinymce.init({ 6 6 selector: "textarea", 7 plugins: wpPlugins,8 7 add_unload_trigger: false, 9 8 disable_nodechange: true, 10 9 skin: false, -
tests/qunit/editor/tinymce/EnterKey.js
4 4 5 5 tinymce.init({ 6 6 selector: "textarea", 7 plugins: wpPlugins,8 7 add_unload_trigger: false, 9 8 disable_nodechange: true, 10 9 indent: false, -
tests/qunit/editor/tinymce/ForceBlocks.js
5 5 6 6 tinymce.init({ 7 7 selector: "textarea", 8 plugins: wpPlugins,9 8 add_unload_trigger: false, 10 9 indent: false, 11 10 skin: false, -
tests/qunit/editor/tinymce/Formatter_apply.js
5 5 6 6 tinymce.init({ 7 7 selector: "#elm1", 8 plugins: wpPlugins, 9 external_plugins: { noneditable: '../../../../tests/qunit/editor/external-plugins/noneditable/plugin.min.js' }, // WP 8 plugins: "noneditable", 10 9 add_unload_trigger: false, 11 10 skin: false, 12 11 indent: false, … … 29 28 30 29 tinymce.init({ 31 30 selector: "#elm2", 32 plugins: wpPlugins,33 31 inline: true, 34 32 add_unload_trigger: false, 35 33 skin: false, … … 1642 1640 equal(getContent(), '<p>1 <strong><span style="text-decoration: underline;">1234</span></strong> 1</p>'); 1643 1641 } 1644 1642 }); 1645 }); 1643 }); 1644 No newline at end of file -
tests/qunit/editor/tinymce/Formatter_check.js
5 5 6 6 tinymce.init({ 7 7 selector: "#elm1", 8 plugins: wpPlugins,9 8 add_unload_trigger: false, 10 9 extended_valid_elements: 'b,i,span[style|contenteditable]', 11 10 skin: false, … … 24 23 25 24 tinymce.init({ 26 25 selector: "#elm2", 27 plugins: wpPlugins,28 26 inline: true, 29 27 add_unload_trigger: false, 30 28 indent: false, -
tests/qunit/editor/tinymce/Formatter_remove.js
5 5 6 6 tinymce.init({ 7 7 selector: "textarea", 8 plugins: wpPlugins, 9 external_plugins: { noneditable: '../../../../tests/qunit/editor/external-plugins/noneditable/plugin.min.js' }, // WP 8 plugins: "noneditable", 10 9 indent: false, 11 10 add_unload_trigger: false, 12 11 skin: false, -
tests/qunit/editor/tinymce/Shortcuts.js
4 4 5 5 tinymce.init({ 6 6 selector: "textarea", 7 plugins: wpPlugins,8 7 add_unload_trigger: false, 9 8 disable_nodechange: true, 10 9 indent: false, -
tests/qunit/editor/tinymce/UndoManager.js
4 4 5 5 tinymce.init({ 6 6 selector: "textarea", 7 plugins: wpPlugins,8 7 add_unload_trigger: false, 9 8 skin: false, 10 9 init_instance_callback: function(ed) { -
tests/qunit/editor/tinymce/dom/Selection.js
4 4 5 5 tinymce.init({ 6 6 selector: "textarea", 7 plugins: wpPlugins,8 7 add_unload_trigger: false, 9 8 skin: false, 10 9 forced_root_block: '', -
tests/qunit/editor/tinymce/dom/TridentSelection.js
10 10 tinymce.init({ 11 11 selector: "textarea", 12 12 elements: "elm1", 13 plugins: wpPlugins,14 13 add_unload_trigger: false, 15 14 disable_nodechange: true, 16 15 skin: false, -
tests/qunit/editor/tinymce/html/Obsolete.js
1 module( 'tinymce.html.Obsolete', {2 setupModule: function() {3 QUnit.stop();4 5 tinymce.init({6 selector: 'textarea',7 plugins: wpPlugins,8 add_unload_trigger : false,9 skin: false,10 indent : false,11 entities : 'raw',12 plugins: 'media',13 convert_urls : false,14 init_instance_callback : function(ed) {15 window.editor = ed;16 QUnit.start();17 }18 });19 }20 });21 22 /**23 * Test whether attribute exists in a HTML string24 *25 * @param html The HTML string26 * @param attr string|object When string, test for the first instance of attr.27 * When object, break up the HTML string into individual tags and test for attr in the specified tag.28 * Format: { tagName: 'attr1 attr2', ... }29 * @return bool30 */31 function hasAttr( html, attr ) {32 var tagName, tags, tag, array, regex, i;33 34 if ( typeof attr === 'string' ) {35 return new RegExp( ' \\b' + attr + '\\b' ).test( html );36 }37 38 for ( tagName in attr ) {39 if ( tags = html.match( new RegExp( '<' + tagName + ' [^>]+>', 'g' ) ) ) {40 for ( tag in tags ) {41 array = attr[tagName].split(' ');42 43 for ( i in array ) {44 regex = new RegExp( '\\b' + array[i] + '\\b' );45 46 if ( regex.test( tags[tag] ) ) {47 attr[tagName] = attr[tagName].replace( regex, '' );48 }49 }50 }51 52 if ( attr[tagName].replace( / +/g, '' ).length ) {53 return false;54 }55 }56 }57 return true;58 }59 60 // Ref: http://www.w3.org/TR/html5/obsolete.html, http://developers.whatwg.org/obsolete.html61 62 test('HTML elements non-conforming to HTML 5.0', function() {63 var testString;64 65 /*66 Not supported, deprecated in HTML 4.0 or earlier, and/or proprietary:67 applet68 bgsound69 dir70 frame71 frameset72 noframes73 isindex74 listing75 nextid76 noembed77 plaintext78 rb79 xmp80 basefont81 blink82 marquee83 multicol84 nobr85 spacer86 87 The rest are still supported in TinyMCE but "...must not be used by authors".88 */89 90 expect(6);91 92 text = 'acronym';93 testString = '<p><acronym title="www">WWW</acronym></p>';94 editor.setContent( testString );95 equal( editor.getContent(), testString, text );96 97 text = 'strike, converted to span';98 editor.setContent( '<strike>test</strike>' );99 equal( editor.getContent(), '<p><span style="text-decoration: line-through;">test</span></p>', text );100 101 text = 'big';102 testString = '<p><big>test</big></p>';103 editor.setContent( testString );104 equal( editor.getContent(), testString, text );105 106 text = 'center';107 testString = '<center>test</center>';108 editor.setContent( testString );109 equal( editor.getContent(), testString, text );110 111 text = 'font, converted to span';112 editor.setContent( '<p><font size="4">test</font></p>' );113 equal( editor.getContent(), '<p><span style="font-size: large;">test</span></p>', text );114 115 text = 'tt';116 testString = '<p><tt>test</tt></p>';117 editor.setContent( testString );118 equal( editor.getContent(), testString, text );119 });120 121 test('Obsolete (but still conforming) HTML attributes', function() {122 var testString;123 124 expect(3);125 126 text = 'border on <img>';127 testString = '<p><img src="../../test.gif" alt="" border="5" /></p>';128 editor.setContent( testString );129 equal( editor.getContent(), testString, text );130 131 text = 'Old style anchors';132 testString = '<p><a name="test"></a></p>';133 editor.setContent( testString );134 equal( editor.getContent(), testString, text );135 136 text = 'maxlength, size on input type="number"';137 testString = '<p><input maxlength="5" size="10" type="number" value="" /></p>';138 editor.setContent( testString );139 ok( hasAttr( editor.getContent(), { input: 'maxlength size' } ), text );140 });141 142 test('Obsolete attributes in HTML 5.0', function() {143 var testString, text;144 145 expect(22);146 147 text = 'charset, rev, shape, coords on <a> elements';148 testString = '<p><a href="javascript;:" charset="en" rev="made" shape="rect" coords="5,5">test</a></p>';149 editor.setContent( testString );150 ok( hasAttr( editor.getContent(), { a: 'charset rev shape coords' } ), text );151 152 text = 'name, align, hspace, vspace on img elements';153 testString = '<p><img src="../../test.gif" alt="" name="test" align="left" hspace="5" vspace="5" /></p>';154 editor.setContent( testString );155 ok( hasAttr( editor.getContent(), { img: 'name align hspace vspace' } ), text );156 157 text = 'name, align, hspace, vspace, on embed elements';158 testString = '<p><embed width="100" height="100" src="test.swf" vspace="5" hspace="5" align="left" name="test"></embed></p>';159 editor.setContent( testString );160 ok( hasAttr( editor.getContent(), { embed: 'name align hspace vspace' } ), text );161 162 text = 'archive, classid, code, codebase, codetype, declare, standby on object elements';163 testString = '<p><object width="100" height="100" classid="clsid" codebase="clsid" standby="standby" codetype="1" code="1" archive="1" declare="declare"></object></p>';164 editor.setContent( testString );165 ok( hasAttr( editor.getContent(), { object: 'archive classid code codebase codetype declare standby' } ), text );166 167 text = 'type, valuetype on param elements';168 testString = '<p><object width="100" height="100"><param type="" valuetype="" /></object></p>';169 editor.setContent( testString );170 ok( hasAttr( editor.getContent(), { param: 'type valuetype' } ), text );171 172 text = 'align, bgcolor, border, cellpadding, cellspacing, frame, rules, summary, width on table elements';173 testString = '<table border="1" summary="" width="100" frame="" rules="" cellspacing="5" cellpadding="5" align="left" bgcolor="blue"><tbody><tr><td>test</td></tr></tbody></table>';174 editor.setContent( testString );175 ok( hasAttr( editor.getContent(), { table: 'align bgcolor border cellpadding cellspacing frame rules summary width' } ), text );176 177 text = 'align, char, charoff, valign on tbody, thead, and tfoot elements';178 testString = '<table><thead align="left" char="" charoff="" valign="top"></thead><tfoot align="left" char="" charoff="" valign="top"></tfoot><tbody align="left" char="" charoff="" valign="top"><tr><th>test</th><td>test</td></tr></tbody></table>';179 editor.setContent( testString );180 ok( hasAttr( editor.getContent(), {181 thead: 'align char charoff valign',182 tfoot: 'align char charoff valign',183 tbody: 'align char charoff valign'184 } ), text );185 186 text = 'axis, align, bgcolor, char, charoff, height, nowrap, valign, width on td and th elements, scope on td elements';187 testString = '<table><tbody><tr><th axis="" align="left" char="" charoff="" valign="top" nowrap="nowrap" bgcolor="blue" width="100" height="10">test</th><td axis="" align="left" char="" charoff="" valign="top" nowrap="nowrap" bgcolor="blue" width="100" height="10" scope="">test</td></tr></tbody></table>';188 editor.setContent( testString );189 ok( hasAttr( editor.getContent(), {190 th: 'axis align bgcolor char charoff height nowrap valign width',191 td: 'axis align bgcolor char charoff height nowrap valign width scope'192 } ), text );193 194 text = 'align, bgcolor, char, charoff, valign on tr elements';195 testString = '<table><tbody><tr align="left" char="" charoff="" valign="top" bgcolor="blue"><td>test</td></tr></tbody></table>';196 editor.setContent( testString );197 ok( hasAttr( editor.getContent(), { tr: 'align bgcolor char charoff valign' } ), text );198 199 text = 'clear on br elements';200 testString = '<p>test<br clear="all" />test</p>';201 editor.setContent( testString );202 equal( editor.getContent(), testString, text );203 204 text = 'align on caption elements';205 testString = '<table><caption align="left">test</caption><tbody><tr><td>test</td></tr></tbody></table>';206 editor.setContent( testString );207 equal( editor.getContent(), testString, text );208 209 text = 'align, char, charoff, valign, width on col elements';210 testString = '<table><colgroup><col width="100" align="left" char="a" charoff="1" valign="top" /><col /></colgroup><tbody><tr><td>test</td><td>test</td></tr></tbody></table>';211 editor.setContent( testString );212 ok( hasAttr( editor.getContent(), { col: 'align char charoff valign width' } ), text );213 214 text = 'align on div, h1—h6, input, legend, p elements';215 testString = '<div align="left">1</div><h3 align="left">1</h3><p align="left">1</p><form><fieldset><legend align="left">test</legend><input type="text" align="left" /></fieldset></form>';216 editor.setContent( testString );217 equal( editor.getContent(), testString, text );218 219 text = 'compact on dl elements';220 testString = '<dl compact="compact"><dd>1</dd></dl>';221 editor.setContent( testString );222 equal( editor.getContent(), testString, text );223 224 text = 'align, hspace, vspace on embed elements';225 testString = '<p><embed width="100" height="100" vspace="5" hspace="5" align="left"></embed></p>';226 editor.setContent( testString );227 ok( hasAttr( editor.getContent(), { embed: 'align hspace vspace' } ), text );228 229 text = 'align, noshade, size, width on hr elements';230 testString = '<hr align="left" noshade="noshade" size="1" width="100" />';231 editor.setContent( testString );232 ok( hasAttr( editor.getContent(), { hr: 'align noshade size width' } ), text );233 234 text = 'align, frameborder, marginheight, marginwidth, scrolling on iframe elements';235 testString = '<p><iframe width="100" height="100" frameborder="1" marginwidth="5" marginheight="5" scrolling="" align="left"></iframe></p>';236 editor.setContent( testString );237 ok( hasAttr( editor.getContent(), { iframe: 'align frameborder marginheight marginwidth scrolling' } ), text );238 239 text = 'type on li elements';240 testString = '<ul><li type="disc">test</li></ul>';241 editor.setContent( testString );242 equal( editor.getContent(), testString, text );243 244 text = 'align, border, hspace, vspace on object elements';245 testString = '<p><object width="100" height="100" border="1" vspace="5" hspace="5" align="left"></object></p>';246 editor.setContent( testString );247 ok( hasAttr( editor.getContent(), { object: 'align border hspace vspace' } ), text );248 249 text = 'compact on ol elements';250 testString = '<ol compact="compact"><li>test</li></ol>';251 editor.setContent( testString );252 equal( editor.getContent(), testString, text );253 254 text = 'compact, type on ul elements';255 testString = '<ul type="disc" compact="compact"><li>test</li></ul>';256 editor.setContent( testString );257 ok( hasAttr( editor.getContent(), { ul: 'compact type' } ), text );258 259 text = 'width on pre elements';260 testString = '<pre width="100">1</pre>';261 editor.setContent( testString );262 equal( editor.getContent(), testString, text );263 }); -
tests/qunit/editor/tinymce/html/Schema.js
162 162 expect(1); 163 163 164 164 schema = new tinymce.html.Schema(); 165 deepEqual(schema.getBoolAttrs(), { // WP: include three additional bool attributes used in the "media" plugin.165 deepEqual(schema.getBoolAttrs(), { 166 166 "CONTROLS": {}, "LOOP": {}, "AUTOPLAY": {}, "SELECTED": {}, "READONLY": {}, "NOWRAP": {}, 167 167 "NOSHADE": {}, "NORESIZE": {}, "NOHREF": {}, "MULTIPLE": {}, "ISMAP": {}, "DISABLED": {}, "DEFER": {}, 168 168 "DECLARE": {}, "COMPACT": {}, "CHECKED": {}, 169 " allowfullscreen": {}, "controls": {}, "loop": {}, "autoplay": {}, "selected": {}, "readonly": {}, "mozallowfullscreen": {},170 "no wrap": {}, "noshade": {}, "noresize": {}, "nohref": {}, "multiple": {}, "ismap": {}, "disabled": {}, "defer": {},171 "declare": {}, "compact": {}, "checked": {} , "webkitallowfullscreen": {}169 "controls": {}, "loop": {}, "autoplay": {}, "selected": {}, "readonly": {}, "nowrap": {}, 170 "noshade": {}, "noresize": {}, "nohref": {}, "multiple": {}, "ismap": {}, "disabled": {}, "defer": {}, 171 "declare": {}, "compact": {}, "checked": {} 172 172 }); 173 173 }); 174 174 -
tests/qunit/editor/tinymce/util/Quirks_webkit.js
5 5 tinymce.init({ 6 6 selector: "textarea", 7 7 elements: "elm1", 8 plugins: wpPlugins,9 8 add_unload_trigger: false, 10 9 skin: false, 11 10 indent: false,