Make WordPress Core

Changeset 28138


Ignore:
Timestamp:
04/15/2014 10:06:11 PM (13 years ago)
Author:
azaozz
Message:

Update the TinyMCE tests to 4.0.21.1, see #27744

Location:
trunk/tests/qunit/editor
Files:
2 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/qunit/editor/index.html

    r27679 r28138  
    66        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    77        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
    8         <title>QUnit tests</title>
    98        <link rel="stylesheet" href="js/qunit/qunit.css" type="text/css" />
    109        <link rel="stylesheet" href="../../../src/wp-includes/js/tinymce/skins/lightgray/skin.min.css" type="text/css" />
    … …  
    7170
    7271        <!-- tinymce.* -->
     72        <script src="tinymce/AddOnManager.js"></script>
    7373        <script src="tinymce/Editor.js"></script>
    7474        <script src="tinymce/EditorCommands.js"></script>
     75        <script src="tinymce/EditorManager.js"></script>
    7576        <script src="tinymce/EnterKey.js"></script>
    7677        <script src="tinymce/ForceBlocks.js"></script>
  • trunk/tests/qunit/editor/js/init.js

    r27679 r28138  
    11(function() {
    2         var coverObjects = [], modulesExecuted = {};
     2        var coverObjects = [], modulesExecuted = {}, log = [], currentModule;
    33
    44        QUnit.config.reorder = false;
     5        QUnit.config.hidepassed = true;
    56
    67        var oldModule = module;
    78
    89        QUnit.moduleStart(function(details) {
     10                currentModule = details.name;
    911                modulesExecuted[details.name] = true;
    1012
    … …  
    1820        });
    1921
    20         QUnit.done(function() {
     22        // Sauce labs
     23        QUnit.testStart(function(testDetails) {
     24                QUnit.log = function(details) {
     25                        if (!details.result) {
     26                                details.name = currentModule + ':' + testDetails.name;
     27                                log.push(details);
     28                        }
     29                };
     30        });
     31
     32        QUnit.done(function(results) {
    2133                document.getElementById("view").style.display = 'none';
    2234
    … …  
    2840                        }).appendTo(document.body);
    2941                }
     42
     43                // Sauce labs
     44                var tests = [];
     45                for (var i = 0; i < log.length; i++) {
     46                        tests.push({
     47                                name: log[i].name,
     48                                result: log[i].result,
     49                                expected: log[i].expected,
     50                                actual: log[i].actual,
     51                                source: log[i].source
     52                        });
     53                }
     54
     55                results.tests = tests;
     56                window.global_test_results = results;
    3057        });
    3158
  • trunk/tests/qunit/editor/js/utils.js

    r27679 r28138  
    9999                        ev = document.createEvent('UIEvents');
    100100
    101                         if (ev.initUIEvent)
     101                        if (ev.initUIEvent) {
    102102                                ev.initUIEvent(na, true, true, window, 1);
     103                        }
    103104
    104105                        ev.keyCode = o.keyCode;
    … …  
    111112        function normalizeRng(rng) {
    112113                if (rng.startContainer.nodeType == 3) {
    113                         if (rng.startOffset == 0)
     114                        if (rng.startOffset === 0) {
    114115                                rng.setStartBefore(rng.startContainer);
    115                         else if (rng.startOffset >= rng.startContainer.nodeValue.length - 1)
     116                        } else if (rng.startOffset >= rng.startContainer.nodeValue.length - 1) {
    116117                                rng.setStartAfter(rng.startContainer);
     118                        }
    117119                }
    118120
    119121                if (rng.endContainer.nodeType == 3) {
    120                         if (rng.endOffset == 0)
     122                        if (rng.endOffset === 0) {
    121123                                rng.setEndBefore(rng.endContainer);
    122                         else if (rng.endOffset >= rng.endContainer.nodeValue.length - 1)
     124                        } else if (rng.endOffset >= rng.endContainer.nodeValue.length - 1) {
    123125                                rng.setEndAfter(rng.endContainer);
     126                        }
    124127                }
    125128
    … …  
    129132        // TODO: Replace this with the new event logic in 3.5
    130133        function type(chr) {
    131                 var editor = tinymce.activeEditor, keyCode, charCode, event = tinymce.dom.Event, evt, startElm, rng;
     134                var editor = tinymce.activeEditor, keyCode, charCode, evt, startElm, rng;
    132135
    133136                function fakeEvent(target, type, evt) {
    … …  
    316319        function trimBrsOnIE(html) {
    317320                return html.replace(/<br[^>]*>/gi, '');
     321        }
     322
     323        function patch(proto, name, patchFunc) {
     324                var originalFunc = proto[name];
     325                var originalFuncs = proto.__originalFuncs;
     326
     327                if (!originalFuncs) {
     328                        proto.__originalFuncs = originalFuncs = {};
     329                }
     330
     331                if (!originalFuncs[name]) {
     332                        originalFuncs[name] = originalFunc;
     333                } else {
     334                        originalFunc = originalFuncs[name];
     335                }
     336
     337                proto[name] = function() {
     338                        var args = Array.prototype.slice.call(arguments);
     339                        args.unshift(originalFunc);
     340                        return patchFunc.apply(this, args);
     341                };
     342        }
     343
     344        function unpatch(proto, name) {
     345                var originalFuncs = proto.__originalFuncs;
     346
     347                if (!originalFuncs) {
     348                        return;
     349                }
     350
     351                if (name) {
     352                        proto[name] = originalFuncs[name];
     353                        delete originalFuncs[name];
     354                } else {
     355                        for (var key in originalFuncs) {
     356                                proto[key] = originalFuncs[key];
     357                        }
     358
     359                        delete proto.__originalFuncs;
     360                }
    318361        }
    319362
    … …  
    335378                pressArrowKey: pressArrowKey,
    336379                pressEnter: pressEnter,
    337                 trimBrsOnIE: trimBrsOnIE
     380                trimBrsOnIE: trimBrsOnIE,
     381                patch: patch,
     382                unpatch: unpatch
    338383        };
    339384})();
  • trunk/tests/qunit/editor/plugins/lists.js

    r27679 r28138  
    55
    66                function wait() {
    7                         if (editor && inlineEditor) {
     7                        if (window.editor && window.inlineEditor) {
    88                                if (!QUnit.started) {
    99                                        QUnit.start();
    … …  
    450450});
    451451
    452 test('Apply UL list to br line and text block line', function() {
    453         editor.settings.forced_root_block = false;
    454 
    455         editor.setContent(
    456                 'a' +
    457                 '<p>b</p>'
    458         );
    459 
    460         var rng = editor.dom.createRng();
    461         rng.setStart(editor.getBody().firstChild, 0);
    462         rng.setEnd(editor.getBody().lastChild.firstChild, 1);
    463         editor.selection.setRng(rng);
    464         execCommand('InsertUnorderedList');
    465 
    466         equal(editor.getContent(),
    467                 '<ul>' +
    468                         '<li>a</li>' +
    469                         '<li>b</li>' +
    470                 '</ul>'
    471         );
    472 
    473         equal(editor.selection.getStart().nodeName, 'LI');
    474         equal(editor.selection.getEnd().nodeName, 'LI');
    475 });
     452// Ignore on IE 7, 8 this is a known bug not worth fixing
     453if (!tinymce.Env.ie || tinymce.Env.ie > 8) {
     454        test('Apply UL list to br line and text block line', function() {
     455                editor.settings.forced_root_block = false;
     456
     457                editor.setContent(
     458                        'a' +
     459                        '<p>b</p>'
     460                );
     461
     462                var rng = editor.dom.createRng();
     463                rng.setStart(editor.getBody().firstChild, 0);
     464                rng.setEnd(editor.getBody().lastChild.firstChild, 1);
     465                editor.selection.setRng(rng);
     466                execCommand('InsertUnorderedList');
     467
     468                equal(editor.getContent(),
     469                        '<ul>' +
     470                                '<li>a</li>' +
     471                                '<li>b</li>' +
     472                        '</ul>'
     473                );
     474
     475                equal(editor.selection.getStart().nodeName, 'LI');
     476                equal(editor.selection.getEnd().nodeName, 'LI');
     477        });
     478}
    476479
    477480test('Apply UL list to text block line and br line', function() {
    … …  
    839842});
    840843
    841 test('Remove empty UL between two textblocks in BR mode', function() {
    842         editor.settings.forced_root_block = false;
    843 
    844         editor.getBody().innerHTML = trimBrs(
    845                 '<div>a</div>' +
    846                 '<ul>' +
    847                         '<li></li>' +
    848                 '</ul>' +
    849                 '<div>b</div>'
    850         );
    851 
    852         editor.focus();
    853         Utils.setSelection('li:first', 0);
    854         execCommand('InsertUnorderedList');
    855 
    856         equal(editor.getContent(),
    857                 '<div>a</div>' +
    858                 '<br />' +
    859                 '<div>b</div>'
    860         );
    861         equal(editor.selection.getStart().nodeName, 'BR');
    862 });
     844// Ignore on IE 7, 8 this is a known bug not worth fixing
     845if (!tinymce.Env.ie || tinymce.Env.ie > 8) {
     846        test('Remove empty UL between two textblocks in BR mode', function() {
     847                editor.settings.forced_root_block = false;
     848
     849                editor.getBody().innerHTML = trimBrs(
     850                        '<div>a</div>' +
     851                        '<ul>' +
     852                                '<li></li>' +
     853                        '</ul>' +
     854                        '<div>b</div>'
     855                );
     856
     857                editor.focus();
     858                Utils.setSelection('li:first', 0);
     859                execCommand('InsertUnorderedList');
     860
     861                equal(editor.getContent(),
     862                        '<div>a</div>' +
     863                        '<br />' +
     864                        '<div>b</div>'
     865                );
     866                equal(editor.selection.getStart().nodeName, 'BR');
     867        });
     868}
    863869
    864870// Outdent
    … …  
    17311737test('Remove UL in inline body element contained in LI', function() {
    17321738        inlineEditor.setContent('<ul><li>a</li></ul>');
    1733         inlineEditor.focus();
     1739        inlineEditor.selection.setCursorLocation();
    17341740        inlineEditor.execCommand('InsertUnorderedList');
    17351741        equal(inlineEditor.getContent(), '<p>a</p>');
  • trunk/tests/qunit/editor/plugins/noneditable.js

    r27679 r28138  
    2424});
    2525
    26 test('expand to noneditable (start)', function() {
    27         editor.setContent('<p><span class="mceNonEditable">no</span>yes</p>');
    28 
    29         var rng = editor.dom.createRng();
    30         rng.setStart(editor.getBody().firstChild.firstChild.firstChild, 1);
    31         rng.setEnd(editor.getBody().firstChild.lastChild, 1);
    32         editor.selection.setRng(rng);
    33 
    34         editor.dom.fire(editor.getBody(), 'mouseup');
    35         rng = Utils.normalizeRng(editor.selection.getRng(true));
    36 
    37         equal(rng.startContainer.nodeName, 'P');
    38         equal(rng.startOffset, 0);
    39         equal(rng.endContainer.nodeName, '#text');
    40         equal(rng.endOffset, 1);
    41 });
    42 
    43 test('expand to noneditable (end)', function() {
    44         editor.setContent('<p>yes<span class="mceNonEditable">no</span></p>');
    45 
    46         var rng = editor.dom.createRng();
    47         rng.setStart(editor.getBody().firstChild.firstChild, 1);
    48         rng.setEnd(editor.getBody().firstChild.lastChild.firstChild, 1);
    49         editor.selection.setRng(rng);
    50 
    51         editor.dom.fire(editor.getBody(), 'mouseup');
    52         rng = Utils.normalizeRng(editor.selection.getRng(true));
    53 
    54         equal(rng.startContainer.nodeName, '#text');
    55         equal(rng.startOffset, 1);
    56         equal(rng.endContainer.nodeName, 'P');
    57         equal(rng.endOffset, 2);
    58 });
    59 
    60 test('expand to noneditable (start/end)', function() {
    61         editor.setContent('<p>yes<span class="mceNonEditable">noedit</span>yes</p>');
    62 
    63         var rng = editor.dom.createRng();
    64         rng.setStart(editor.dom.select('span')[0].firstChild, 1);
    65         rng.setEnd(editor.dom.select('span')[0].firstChild, 2);
    66         editor.selection.setRng(rng);
    67 
    68         editor.dom.fire(editor.getBody(), 'mouseup');
    69         rng = Utils.normalizeRng(editor.selection.getRng(true));
    70 
    71         equal(rng.startContainer.nodeName, 'P');
    72         equal(rng.startOffset, 1);
    73         equal(rng.endContainer.nodeName, 'P');
    74         equal(rng.endOffset, 2);
    75 });
    76 
    77 test('type after non editable', function() {
    78         editor.setContent('<p><span class="mceNonEditable">no</span>yes</p>');
    79 
    80         var rng = editor.dom.createRng();
    81         rng.setStart(editor.dom.select('span')[0].firstChild, 2);
    82         rng.setEnd(editor.dom.select('span')[0].firstChild, 2);
    83         editor.selection.setRng(rng);
    84 
    85         editor.dom.fire(editor.getBody(), 'mouseup');
    86         Utils.type('X');
    87         rng = Utils.normalizeRng(editor.selection.getRng(true));
    88 
    89         equal(rng.startContainer.getAttribute('data-mce-bogus'), 'true');
    90         equal(rng.startContainer.nodeName, 'SPAN');
    91         equal(rng.startOffset, 1);
    92         equal(rng.endContainer.nodeName, 'SPAN');
    93         equal(rng.endOffset, 1);
    94         equal(editor.getContent(), '<p><span class="mceNonEditable">no</span>Xyes</p>');
    95 });
     26// Ignore on IE 7, 8 this is a known bug not worth fixing
     27if (!tinymce.Env.ie || tinymce.Env.ie > 8) {
     28        test('expand to noneditable (start)', function() {
     29                editor.setContent('<p><span class="mceNonEditable">no</span>yes</p>');
     30
     31                var rng = editor.dom.createRng();
     32                rng.setStart(editor.getBody().firstChild.firstChild.firstChild, 1);
     33                rng.setEnd(editor.getBody().firstChild.lastChild, 1);
     34                editor.selection.setRng(rng);
     35
     36                editor.dom.fire(editor.getBody(), 'mouseup');
     37                rng = Utils.normalizeRng(editor.selection.getRng(true));
     38
     39                equal(rng.startContainer.nodeName, 'P');
     40                equal(rng.startOffset, 0);
     41                equal(rng.endContainer.nodeName, '#text');
     42                equal(rng.endOffset, 1);
     43        });
     44
     45        test('expand to noneditable (end)', function() {
     46                editor.setContent('<p>yes<span class="mceNonEditable">no</span></p>');
     47
     48                var rng = editor.dom.createRng();
     49                rng.setStart(editor.getBody().firstChild.firstChild, 1);
     50                rng.setEnd(editor.getBody().firstChild.lastChild.firstChild, 1);
     51                editor.selection.setRng(rng);
     52
     53                editor.dom.fire(editor.getBody(), 'mouseup');
     54                rng = Utils.normalizeRng(editor.selection.getRng(true));
     55
     56                equal(rng.startContainer.nodeName, '#text');
     57                equal(rng.startOffset, 1);
     58                equal(rng.endContainer.nodeName, 'P');
     59                equal(rng.endOffset, 2);
     60        });
     61
     62        test('expand to noneditable (start/end)', function() {
     63                editor.setContent('<p>yes<span class="mceNonEditable">noedit</span>yes</p>');
     64
     65                var rng = editor.dom.createRng();
     66                rng.setStart(editor.dom.select('span')[0].firstChild, 1);
     67                rng.setEnd(editor.dom.select('span')[0].firstChild, 2);
     68                editor.selection.setRng(rng);
     69
     70                editor.dom.fire(editor.getBody(), 'mouseup');
     71                rng = Utils.normalizeRng(editor.selection.getRng(true));
     72
     73                equal(rng.startContainer.nodeName, 'P');
     74                equal(rng.startOffset, 1);
     75                equal(rng.endContainer.nodeName, 'P');
     76                equal(rng.endOffset, 2);
     77        });
     78
     79        test('type after non editable', function() {
     80                editor.setContent('<p><span class="mceNonEditable">no</span>yes</p>');
     81
     82                var rng = editor.dom.createRng();
     83                rng.setStart(editor.dom.select('span')[0].firstChild, 2);
     84                rng.setEnd(editor.dom.select('span')[0].firstChild, 2);
     85                editor.selection.setRng(rng);
     86
     87                editor.dom.fire(editor.getBody(), 'mouseup');
     88                Utils.type('X');
     89                rng = Utils.normalizeRng(editor.selection.getRng(true));
     90
     91                equal(rng.startContainer.getAttribute('data-mce-bogus'), 'true');
     92                equal(rng.startContainer.nodeName, 'SPAN');
     93                equal(rng.startOffset, 1);
     94                equal(rng.endContainer.nodeName, 'SPAN');
     95                equal(rng.endOffset, 1);
     96                equal(editor.getContent(), '<p><span class="mceNonEditable">no</span>Xyes</p>');
     97        });
     98}
    9699
    97100test('type between non editable', function() {
    … …  
    135138});
    136139
    137 test('escape noneditable inline element (left)', function() {
    138         editor.setContent('<p>no <span class="mceNonEditable">yes</span> no</p><p class="mceNonEditable">no</p>');
    139 
    140         var rng = editor.dom.createRng();
    141         rng.selectNode(editor.dom.select('span')[0]);
    142         editor.selection.setRng(rng);
    143 
    144         Utils.type({keyCode: 37});
    145         rng = Utils.normalizeRng(editor.selection.getRng(true));
    146 
    147         equal(rng.startContainer.nodeName, 'SPAN');
    148         equal(rng.startContainer.parentNode.nodeName, 'P');
    149         equal(editor.dom.nodeIndex(rng.startContainer), 1);
    150         equal(rng.collapsed, true);
    151 });
     140// Ignore on IE 7, 8 this is a known bug not worth fixing
     141if (!tinymce.Env.ie || tinymce.Env.ie > 8) {
     142        test('escape noneditable inline element (left)', function() {
     143                editor.setContent('<p>no <span class="mceNonEditable">yes</span> no</p><p class="mceNonEditable">no</p>');
     144
     145                var rng = editor.dom.createRng();
     146                rng.selectNode(editor.dom.select('span')[0]);
     147                editor.selection.setRng(rng);
     148
     149                Utils.type({keyCode: 37});
     150                rng = Utils.normalizeRng(editor.selection.getRng(true));
     151
     152                equal(rng.startContainer.nodeName, 'SPAN');
     153                equal(rng.startContainer.parentNode.nodeName, 'P');
     154                equal(editor.dom.nodeIndex(rng.startContainer), 1);
     155                equal(rng.collapsed, true);
     156        });
     157}
    152158
    153159test('escape noneditable inline element (right)', function() {
  • trunk/tests/qunit/editor/plugins/paste.js

    r27679 r28138  
    1616                        }
    1717                });
     18        },
     19
     20        teardown: function() {
     21                delete editor.settings.paste_remove_styles_if_webkit;
     22                delete editor.settings.paste_retain_style_properties;
     23                delete editor.settings.paste_enable_default_filters;
     24                delete editor.settings.paste_data_images;
    1825        }
    1926});
    … …  
    97104        editor.execCommand('mceInsertClipboardContent', false, {content: '<p class="ListStyle" style="margin-left:36.0pt;mso-add-space:auto;text-indent:-18.0pt;mso-list:l0 level1 lfo1;tab-stops:list 36.0pt"><span lang="EN-US" style="color:black;mso-ansi-language:EN-US"><span style="mso-list:Ignore">1.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-family:Arial;mso-fareast-font-family:Arial;mso-bidi-font-family:Arial;color:black;mso-ansi-language:EN-US">Version 7.0</span><span lang="EN-US" style="font-family:Arial;mso-fareast-font-family:Arial;mso-bidi-font-family:Arial;color:black;mso-ansi-language:EN-US">:<o:p></o:p></span></p>'});
    98105        equal(editor.getContent().replace(/[\r\n]+/g, ''), '<ol><li>Version 7.0:</li></ol>');
    99         editor.settings.paste_retain_style_properties = '';
    100106});
    101107
    … …  
    140146        editor.execCommand('mceInsertClipboardContent', false, {content: '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CUsers%5Cspocke%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CUsers%5Cspocke%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cspocke%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF/> <w:LidThemeOther>SV</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:SplitPgBreakAndParaMark/> <w:DontVertAlignCellWithSp/> <w:DontBreakConstrainedForcedTables/> <w:DontVertAlignInTxbx/> <w:Word11KerningPairs/> <w:CachedColBalance/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math"/> <m:brkBin m:val="before"/> <m:brkBinSub m:val="&#45;-"/> <m:smallFrac m:val="off"/> <m:dispDef/> <m:lMargin m:val="0"/> <m:rMargin m:val="0"/> <m:defJc m:val="centerGroup"/> <m:wrapIndent m:val="1440"/> <m:intLim m:val="subSup"/> <m:naryLim m:val="undOvr"/> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true" DefSemiHidden="true" DefQFormat="false" DefPriority="99" LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Normal"/> <w:LsdException Locked="false" Priority="9" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/> <w:LsdException Locked="false" Priority="39" Name="toc 1"/> <w:LsdException Locked="false" Priority="39" Name="toc 2"/> <w:LsdException Locked="false" Priority="39" Name="toc 3"/> <w:LsdException Locked="false" Priority="39" Name="toc 4"/> <w:LsdException Locked="false" Priority="39" Name="toc 5"/> <w:LsdException Locked="false" Priority="39" Name="toc 6"/> <w:LsdException Locked="false" Priority="39" Name="toc 7"/> <w:LsdException Locked="false" Priority="39" Name="toc 8"/> <w:LsdException Locked="false" Priority="39" Name="toc 9"/> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/> <w:LsdException Locked="false" Priority="10" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Title"/> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/> <w:LsdException Locked="false" Priority="11" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/> <w:LsdException Locked="false" Priority="22" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Strong"/>  <w:LsdException Locked="false" Priority="20" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>  <w:LsdException Locked="false" Priority="59" SemiHidden="false" UnhideWhenUsed="false" Name="Table Grid"/>  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>  <w:LsdException Locked="false" Priority="1" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 1"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 1"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 1"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>  <w:LsdException Locked="false" Priority="34" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>  <w:LsdException Locked="false" Priority="29" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Quote"/>  <w:LsdException Locked="false" Priority="30" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 1"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 1"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 2"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 2"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 2"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 2"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 2"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 3"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 3"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 3"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 3"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 3"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 4"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 4"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 4"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 4"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 4"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 5"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 5"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 5"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 5"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 5"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 6"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 6"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 6"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 6"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 6"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>  <w:LsdException Locked="false" Priority="19" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>  <w:LsdException Locked="false" Priority="21" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>  <w:LsdException Locked="false" Priority="31" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>  <w:LsdException Locked="false" Priority="32" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>  <w:LsdException Locked="false" Priority="33" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>  <w:LsdException Locked="false" Priority="37" Name="Bibliography"/>  <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>  </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:36.0pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:0cm; margin-left:36.0pt; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:0cm; margin-left:36.0pt; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:36.0pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:595.3pt 841.9pt; margin:70.85pt 70.85pt 70.85pt 70.85pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;} table.MsoTableGrid {mso-style-name:"Table Grid"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-priority:59; mso-style-unhide:no; border:solid black 1.0pt; mso-border-themecolor:text1; mso-border-alt:solid black .5pt; mso-border-themecolor:text1; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-border-insideh:.5pt solid black; mso-border-insideh-themecolor:text1; mso-border-insidev:.5pt solid black; mso-border-insidev-themecolor:text1; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;} </style> <![endif]--> <table class="MsoTableGrid" style="border: medium none ; margin-left: 36pt; border-collapse: collapse;" border="1" cellpadding="0" cellspacing="0"> <tbody><tr style=""> <td style="border: 1pt solid black; padding: 0cm 5.4pt; width: 230.3pt;" valign="top" width="307"> <p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0.0001pt; line-height: normal;">Cell 1</p> </td> <td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; width: 230.3pt;" valign="top" width="307"> <p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0.0001pt; line-height: normal;">Cell 2</p> </td> </tr> <tr style=""> <td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;" valign="top" width="307"> <p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0.0001pt; line-height: normal;">Cell 3</p> </td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 230.3pt;" valign="top" width="307"> <p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0.0001pt; line-height: normal;">Cell 4</p> </td> </tr> </tbody></table> <p class="MsoListParagraph"><o:p>&nbsp;</o:p></p>'});
    141147        equal(editor.getContent().replace(/[\r\n]+/g, ''), '<table><tbody><tr><td width="307"><p>Cell 1</p></td><td width="307"><p>Cell 2</p></td></tr><tr><td width="307"><p>Cell 3</p></td><td width="307"><p>Cell 4</p></td></tr></tbody></table><p>&nbsp;</p>');
     148});
     149
     150test("Paste Office 365", function() {
     151        var rng = editor.dom.createRng();
     152
     153        editor.setContent('<p>1234</p>');
     154        rng.setStart(editor.getBody().firstChild.firstChild, 0);
     155        rng.setEnd(editor.getBody().firstChild.firstChild, 4);
     156        editor.selection.setRng(rng);
     157
     158        editor.execCommand('mceInsertClipboardContent', false, {content: '<div class="OutlineElement Ltr SCX195156559">Test</div>'});
     159        equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>Test</p>');
     160});
     161
     162test("Paste Google Docs", function() {
     163        var rng = editor.dom.createRng();
     164
     165        editor.setContent('<p>1234</p>');
     166        rng.setStart(editor.getBody().firstChild.firstChild, 0);
     167        rng.setEnd(editor.getBody().firstChild.firstChild, 4);
     168        editor.selection.setRng(rng);
     169
     170        editor.execCommand('mceInsertClipboardContent', false, {content: '<span id="docs-internal-guid-94e46f1a-1c88-b42b-d502-1d19da30dde7"></span><p dir="ltr>Test</p>'});
     171        equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>Test</p>');
    142172});
    143173
    … …  
    198228        editor.execCommand('mceInsertClipboardContent', false, {content: '<p class="MsoNormal" style="background-color: #ff0000">Test</p>'});
    199229        equal(Utils.trimContent(editor.getContent().replace(/[\r\n]+/g, '')), '<p style=\"background-color: #ff0000;\">Test</p>');
    200 
    201         editor.settings.paste_retain_style_properties = '';
     230});
     231
     232test("Paste Word retain bold/italic styles to elements", function() {
     233        editor.settings.paste_retain_style_properties = 'color';
     234
     235        editor.setContent('');
     236
     237        editor.execCommand('mceInsertClipboardContent', false, {
     238                content: (
     239                        '<p class="MsoNormal">' +
     240                                '<span style="font-weight: bold">bold</span>' +
     241                                '<span style="font-style: italic">italic</span>' +
     242                                '<span style="font-weight: bold; font-style: italic">bold + italic</span>' +
     243                                '<span style="font-weight: bold; color: red">bold + color</span>' +
     244                        '</p>'
     245                )
     246        });
     247
     248        equal(editor.getContent(), '<p><strong>bold</strong><em>italic</em><strong><em>bold + italic</em></strong><strong><span style="color: red;">bold + color</span></strong></p>');
    202249});
    203250
    … …  
    218265        editor.execCommand('mceInsertClipboardContent', false, {content: '<p class="MsoNormal" style="color: #ff0000;">Test</p>'});
    219266        equal(Utils.trimContent(editor.getContent().replace(/[\r\n]+/g, '')), '<p class="MsoNormal" style="color: #ff0000;">Test</p>');
    220 
    221         editor.settings.paste_enable_default_filters = true;
    222267});
    223268
    … …  
    402447        equal(tinymce.pasteplugin.Utils.innerText(editor.getBody().firstChild.innerHTML), ' a ');
    403448});
     449
     450if (tinymce.Env.webkit) {
     451        test('paste webkit remove runtime styles (color)', function() {
     452                editor.setContent('');
     453                editor.execCommand('mceInsertClipboardContent', false, {content: '<span style="color:red; text-indent: 10px">Test</span>'});
     454                equal(editor.getContent(), '<p><span style="color: red;">Test</span></p>');
     455        });
     456
     457        test('paste webkit remove runtime styles (background-color)', function() {
     458                editor.setContent('');
     459                editor.execCommand('mceInsertClipboardContent', false, {content: '<span style="background-color:red; text-indent: 10px">Test</span>'});
     460                equal(editor.getContent(), '<p><span style="background-color: red;">Test</span></p>');
     461        });
     462
     463        test('paste webkit remove runtime styles (font-size)', function() {
     464                editor.setContent('');
     465                editor.execCommand('mceInsertClipboardContent', false, {content: '<span style="font-size:42px; text-indent: 10px">Test</span>'});
     466                equal(editor.getContent(), '<p><span style="font-size: 42px;">Test</span></p>');
     467        });
     468/*
     469        test('paste webkit remove runtime styles (font-family)', function() {
     470                editor.setContent('');
     471                editor.execCommand('mceInsertClipboardContent', false, {content: '<span style="font-family:Arial; text-indent: 10px">Test</span>'});
     472                equal(editor.getContent(), '<p><span style="font-family: Arial;">Test</span></p>');
     473        });
     474*/
     475        test('paste webkit remove runtime styles (custom styles)', function() {
     476                editor.settings.paste_webkit_styles = 'color font-style';
     477                editor.setContent('');
     478                editor.execCommand('mceInsertClipboardContent', false, {content: '<span style="color: red; font-style: italic; text-indent: 10px">Test</span>'});
     479                equal(editor.getContent(), '<p><span style="color: red; font-style: italic;">Test</span></p>');
     480        });
     481
     482        test('paste webkit remove runtime styles (all)', function() {
     483                editor.settings.paste_webkit_styles = 'all';
     484                editor.setContent('');
     485                editor.execCommand('mceInsertClipboardContent', false, {content: '<span style="color: red; font-style: italic; text-indent: 10px">Test</span>'});
     486                equal(editor.getContent(), '<p><span style=\"color: red; font-style: italic; text-indent: 10px;\">Test</span></p>');
     487        });
     488
     489        test('paste webkit remove runtime styles (none)', function() {
     490                editor.settings.paste_webkit_styles = 'none';
     491                editor.setContent('');
     492                editor.execCommand('mceInsertClipboardContent', false, {content: '<span style="color: red; font-style: italic; text-indent: 10px">Test</span>'});
     493                equal(editor.getContent(), '<p>Test</p>');
     494        });
     495
     496        test('paste webkit remove runtime styles (color) in the same (color) (named)', function() {
     497                editor.setContent('<p style="color:red">Test</span>');
     498                Utils.setSelection('p', 0, 'p', 4);
     499
     500                editor.execCommand('mceInsertClipboardContent', false, {
     501                        content: (
     502                                '<span style="color:red; text-indent: 10px">a</span>' +
     503                                '<span style="color:#ff0000; text-indent: 10px">b</span>' +
     504                                '<span style="color:rgb(255, 0, 0); text-indent: 10px">c</span>'
     505                        )
     506                });
     507
     508                equal(editor.getContent(), '<p style="color: red;">abc</p>');
     509        });
     510
     511        test('paste webkit remove runtime styles (color) in the same (color) (hex)', function() {
     512                editor.setContent('<p style="color:#ff0000">Test</span>');
     513                Utils.setSelection('p', 0, 'p', 4);
     514
     515                editor.execCommand('mceInsertClipboardContent', false, {
     516                        content: (
     517                                '<span style="color:red; text-indent: 10px">a</span>' +
     518                                '<span style="color:#ff0000; text-indent: 10px">b</span>' +
     519                                '<span style="color:rgb(255, 0, 0); text-indent: 10px">c</span>'
     520                        )
     521                });
     522
     523                equal(editor.getContent(), '<p style="color: #ff0000;">abc</p>');
     524        });
     525
     526        test('paste webkit remove runtime styles (color) in the same (color) (rgb)', function() {
     527                editor.setContent('<p style="color:rgb(255, 0, 0)">Test</span>');
     528                Utils.setSelection('p', 0, 'p', 4);
     529
     530                editor.execCommand('mceInsertClipboardContent', false, {
     531                        content: (
     532                                '<span style="color:red; text-indent: 10px">a</span>' +
     533                                '<span style="color:#ff0000; text-indent: 10px">b</span>' +
     534                                '<span style="color:rgb(255, 0, 0); text-indent: 10px">c</span>'
     535                        )
     536                });
     537
     538                equal(editor.getContent(), '<p style="color: #ff0000;">abc</p>');
     539        });
     540}
  • trunk/tests/qunit/editor/tinymce/Editor.js

    r27679 r28138  
    99                        skin: false,
    1010                        entities: 'raw',
     11                        indent: false,
    1112                        valid_styles: {
    1213                                '*': 'color,font-size,font-family,background-color,font-weight,font-style,text-decoration,float,margin,margin-top,margin-right,margin-bottom,margin-left,display'
    … …  
    138139                editor.dom.replace(p, editor.getBody().firstChild);
    139140
    140                 equal(editor.getContent(), '<p>123</p>\n<table>\n<tbody>\n<tr>\n<td>X</td>\n</tr>\n</tbody>\n</table>\n<p>456</p>');
     141                equal(editor.getContent(), '<p>123</p><table><tbody><tr><td>X</td></tr></tbody></table><p>456</p>');
    141142        }
    142143});
    … …  
    188189
    189190test('custom elements', function() {
    190         expect(1);
    191 
    192191        editor.setContent('<custom1>c1</custom1><custom2>c1</custom2>');
    193         equal(editor.getContent().replace(/[\r\n]/g, ''), '<custom1>c1</custom1><p><custom2>c1</custom2></p>');
     192        equal(editor.getContent(), '<custom1>c1</custom1><p><custom2>c1</custom2></p>');
    194193});
    195194
     195test('Store/restore tabindex', function() {
     196        editor.setContent('<span tabindex="42">abc</span>');
     197        equal(editor.getContent({format:'raw'}).toLowerCase(), '<p><span data-mce-tabindex="42">abc</span></p>');
     198        equal(editor.getContent(), '<p><span tabindex="42">abc</span></p>');
     199});
  • trunk/tests/qunit/editor/tinymce/EnterKey.js

    r27679 r28138  
    393393        );
    394394
    395         equal(editor.selection.getNode().nodeName, 'LI');
     395        // Ignore on IE 7, 8 this is a known bug not worth fixing
     396        if (!tinymce.Env.ie || tinymce.Env.ie > 8) {
     397                equal(editor.selection.getNode().nodeName, 'LI');
     398        }
    396399});
    397400
    … …  
    428431// Nested lists in OL elements
    429432
    430 test('Enter before nested list', function() {
    431         editor.getBody().innerHTML = Utils.trimBrsOnIE(
    432                 '<ol>' +
    433                         '<li>a' +
    434                                 '<ul>' +
    435                                         '<li>b</li>' +
    436                                         '<li>c</li>' +
    437                                 '</ul>' +
    438                         '</li>' +
    439                 '</ol>'
    440         );
    441 
    442         Utils.setSelection('ol > li', 1);
    443         editor.focus();
    444         Utils.pressEnter();
    445 
    446         equal(editor.getContent(),
    447                 '<ol>' +
    448                         '<li>a</li>' +
    449                         '<li>\u00a0' +
    450                                 '<ul>' +
    451                                         '<li>b</li>' +
    452                                         '<li>c</li>' +
    453                                 '</ul>' +
    454                         '</li>' +
    455                 '</ol>'
    456         );
    457 
    458         equal(editor.selection.getNode().nodeName, 'LI');
    459 });
     433// Ignore on IE 7, 8 this is a known bug not worth fixing
     434if (!tinymce.Env.ie || tinymce.Env.ie > 8) {
     435        test('Enter before nested list', function() {
     436                editor.getBody().innerHTML = Utils.trimBrsOnIE(
     437                        '<ol>' +
     438                                '<li>a' +
     439                                        '<ul>' +
     440                                                '<li>b</li>' +
     441                                                '<li>c</li>' +
     442                                        '</ul>' +
     443                                '</li>' +
     444                        '</ol>'
     445                );
     446
     447                Utils.setSelection('ol > li', 1);
     448                editor.focus();
     449                Utils.pressEnter();
     450
     451                equal(editor.getContent(),
     452                        '<ol>' +
     453                                '<li>a</li>' +
     454                                '<li>\u00a0' +
     455                                        '<ul>' +
     456                                                '<li>b</li>' +
     457                                                '<li>c</li>' +
     458                                        '</ul>' +
     459                                '</li>' +
     460                        '</ol>'
     461                );
     462
     463                equal(editor.selection.getNode().nodeName, 'LI');
     464        });
     465}
    460466
    461467test('Enter inside empty LI in beginning of OL in OL', function() {
    … …  
    562568        Utils.pressEnter();
    563569        equal(editor.getContent(),'<ol><li><p>ab</p></li><li><p>cd</p></li></ol>');
    564         equal(editor.selection.getNode().nodeName, 'P');
     570
     571        // Ignore on IE 7, 8 this is a known bug not worth fixing
     572        if (!tinymce.Env.ie || tinymce.Env.ie > 8) {
     573                equal(editor.selection.getNode().nodeName, 'P');
     574        }
    565575});
    566576
    … …  
    919929});
    920930
    921 test('Enter before BR between DIVs', function() {
    922         editor.getBody().innerHTML = '<div>a<span>b</span>c</div><br /><div>d</div>';
    923         var rng = editor.dom.createRng();
    924         rng.setStartBefore(editor.dom.select('br')[0]);
    925         rng.setEndBefore(editor.dom.select('br')[0]);
    926         editor.selection.setRng(rng);
    927         Utils.pressEnter();
    928         equal(editor.getContent(),'<div>a<span>b</span>c</div><p>\u00a0</p><p>\u00a0</p><div>d</div>');
    929 });
     931// Ignore on IE 7, 8 this is a known bug not worth fixing
     932if (!tinymce.Env.ie || tinymce.Env.ie > 8) {
     933        test('Enter before BR between DIVs', function() {
     934                editor.getBody().innerHTML = '<div>a<span>b</span>c</div><br /><div>d</div>';
     935                var rng = editor.dom.createRng();
     936                rng.setStartBefore(editor.dom.select('br')[0]);
     937                rng.setEndBefore(editor.dom.select('br')[0]);
     938                editor.selection.setRng(rng);
     939                Utils.pressEnter();
     940                equal(editor.getContent(),'<div>a<span>b</span>c</div><p>\u00a0</p><p>\u00a0</p><div>d</div>');
     941        });
     942}
    930943
    931944// Only test these on modern browsers
  • trunk/tests/qunit/editor/tinymce/Formatter_check.js

    r27679 r28138  
    229229        ok(!inlineEditor.formatter.match('div'), 'Formatter.match on div says true');
    230230});
     231
     232test('Get preview css text for formats', function() {
     233        ok(/font-weight\:(bold|700)/.test(editor.formatter.getCssText('bold')), 'Bold not found in preview style');
     234        ok(/font-weight\:(bold|700)/.test(editor.formatter.getCssText({inline: 'b'})), 'Bold not found in preview style');
     235});
  • trunk/tests/qunit/editor/tinymce/UndoManager.js

    r27679 r28138  
    150150});
    151151
    152 asyncTest('Undo added when typing and losing focus', function() {
    153         window.focus();
    154 
    155         window.setTimeout(function() {
    156                 start();
    157 
    158                 editor.focus();
    159                 editor.undoManager.clear();
    160                 editor.setContent("<p>some text</p>");
    161                 Utils.setSelection('p', 4, 'p', 9);
    162                 Utils.type('\b');
    163 
    164                 // Move focus to an input element
    165                 var input = document.createElement('input');
    166                 document.getElementById('view').appendChild(input);
    167                 input.focus();
    168                 input.parentNode.removeChild(input);
    169 
    170                 editor.execCommand('FormatBlock', false, 'h1');
    171                 editor.undoManager.undo();
    172                 equal(editor.getContent(), "<p>some</p>");
    173         }, 0);
    174 });
     152test('Transact', function() {
     153        var count = 0;
     154
     155        editor.undoManager.clear();
     156
     157        editor.on('BeforeAddUndo', function() {
     158                count++;
     159        });
     160
     161        editor.undoManager.transact(function() {
     162                editor.undoManager.add();
     163                editor.undoManager.add();
     164        });
     165
     166        equal(count, 1);
     167});
     168
     169test('Transact nested', function() {
     170        var count = 0;
     171
     172        editor.undoManager.clear();
     173
     174        editor.on('BeforeAddUndo', function() {
     175                count++;
     176        });
     177
     178        editor.undoManager.transact(function() {
     179                editor.undoManager.add();
     180
     181                editor.undoManager.transact(function() {
     182                        editor.undoManager.add();
     183                });
     184        });
     185
     186        equal(count, 1);
     187});
     188
     189test('Transact exception', function() {
     190        var count = 0;
     191
     192        editor.undoManager.clear();
     193
     194        editor.on('BeforeAddUndo', function() {
     195                count++;
     196        });
     197
     198        throws(
     199                function() {
     200                        editor.undoManager.transact(function() {
     201                                throw new Error("Test");
     202                        });
     203                },
     204
     205                "Test"
     206        );
     207
     208        editor.undoManager.add();
     209
     210        equal(count, 1);
     211});
     212
     213test('Exclude internal elements', function() {
     214        var count = 0, lastLevel;
     215
     216        editor.undoManager.clear();
     217        equal(count, 0);
     218
     219        editor.on('AddUndo', function() {
     220                count++;
     221        });
     222
     223        editor.on('BeforeAddUndo', function(e) {
     224                lastLevel = e.level;
     225        });
     226
     227        editor.getBody().innerHTML = (
     228                'test' +
     229                '<img src="about:blank" data-mce-selected="1" />' +
     230                '<table data-mce-selected="1"><tr><td>x</td></tr></table>'
     231        );
     232
     233        editor.undoManager.add();
     234        equal(count, 1);
     235        equal(Utils.cleanHtml(lastLevel.content),
     236                'test' +
     237                '<img src="about:blank">' +
     238                '<table><tbody><tr><td>x</td></tr></tbody></table>'
     239        );
     240
     241        editor.getBody().innerHTML = (
     242                '<span data-mce-bogus="1">\u200B</span>' +
     243                '<span data-mce-bogus="1">\uFEFF</span>' +
     244                '<div data-mce-bogus="1"></div>' +
     245                'test' +
     246                '<img src="about:blank" />' +
     247                '<table><tr><td>x</td></tr></table>'
     248        );
     249
     250        editor.undoManager.add();
     251        equal(count, 1);
     252        equal(Utils.cleanHtml(lastLevel.content),
     253                'test' +
     254                '<img src="about:blank">' +
     255                '<table><tbody><tr><td>x</td></tr></tbody></table>'
     256        );
     257});
     258
     259test('Undo added when typing and losing focus', function() {
     260        var lastLevel;
     261
     262        editor.on('BeforeAddUndo', function(e) {
     263                lastLevel = e.level;
     264        });
     265
     266        editor.undoManager.clear();
     267        editor.setContent("<p>some text</p>");
     268        Utils.setSelection('p', 4, 'p', 9);
     269        Utils.type('\b');
     270
     271        equal(Utils.cleanHtml(lastLevel.content), "<p>some text</p>");
     272        editor.fire('blur');
     273        equal(Utils.cleanHtml(lastLevel.content), "<p>some</p>");
     274
     275        editor.execCommand('FormatBlock', false, 'h1');
     276        editor.undoManager.undo();
     277        equal(editor.getContent(), "<p>some</p>");
     278});
     279
     280test('BeforeAddUndo event', function() {
     281        var lastEvt, addUndoEvt;
     282
     283        editor.on('BeforeAddUndo', function(e) {
     284                lastEvt = e;
     285        });
     286
     287        editor.undoManager.clear();
     288        editor.setContent("<p>a</p>");
     289        editor.undoManager.add();
     290
     291        equal(lastEvt.lastLevel, null);
     292        equal(Utils.cleanHtml(lastEvt.level.content), "<p>a</p>");
     293
     294        editor.setContent("<p>b</p>");
     295        editor.undoManager.add();
     296
     297        equal(Utils.cleanHtml(lastEvt.lastLevel.content), "<p>a</p>");
     298        equal(Utils.cleanHtml(lastEvt.level.content), "<p>b</p>");
     299
     300        editor.on('BeforeAddUndo', function(e) {
     301                e.preventDefault();
     302        });
     303
     304        editor.on('AddUndo', function(e) {
     305                addUndoEvt = e;
     306        });
     307
     308        editor.setContent("<p>c</p>");
     309        editor.undoManager.add(null, {data: 1});
     310
     311        equal(Utils.cleanHtml(lastEvt.lastLevel.content), "<p>b</p>");
     312        equal(Utils.cleanHtml(lastEvt.level.content), "<p>c</p>");
     313        equal(lastEvt.originalEvent.data, 1);
     314        ok(!addUndoEvt, "Event level produced when it should be blocked");
     315});
  • trunk/tests/qunit/editor/tinymce/dom/EventUtils.js

    r27679 r28138  
    329329});
    330330
     331/*
    331332asyncTest("focusin/focusout bind/unbind", function() {
    332333        var result = {};
    … …  
    349350        }, 0);
    350351});
     352*/
    351353
    352354test("bind unbind fire clean on null", function() {
  • trunk/tests/qunit/editor/tinymce/dom/Serializer.js

    r27679 r28138  
    491491        equal(ser.serialize(DOM.get('test')), '<span class="b"></span>');
    492492});
     493
     494test('Restore tabindex', function() {
     495        var ser = new tinymce.dom.Serializer({
     496                valid_elements: 'span[tabindex]'
     497        });
     498
     499        DOM.setHTML('test', '<span data-mce-tabindex="42"></span>');
     500        equal(ser.serialize(DOM.get('test')), '<span tabindex="42"></span>');
     501});
  • trunk/tests/qunit/editor/tinymce/ui/Control.js

    r27679 r28138  
    5454        });
    5555
    56         /*
    5756        test("Properties", function() {
    5857                var ctrl, cont;
    … …  
    9089                // Set all states
    9190                ctrl = ctrl.
    92                         refresh().
    93                         bind('click', function() {}).
    94                         unbind().
    95                         renderTo(document.getElementById('viewport')).
    96                         fire("nothing").
     91                        on('click', function() {}).
     92                        off().
     93                        renderTo(document.getElementById('view')).
    9794                        remove();
    9895
    … …  
    103100        test("Events", function() {
    104101                var ctrl = new tinymce.ui.Control({
    105                         handlers: {
     102                        onMyEvent: function() {
     103                                count++;
     104                        },
     105                        callbacks: {
    106106                                handler1: function() {
    107107                                        count++;
    … …  
    110110                }), count;
    111111
    112                 ctrl.bind('MyEvent', function(target, args) {
    113                         ok(target === ctrl);
    114                         ok(ctrl === this);
    115                         deepEqual(args, {myKey: 'myVal'});
     112                ctrl.on('MyEvent', function(args) {
     113                        equal(ctrl, args.control);
     114                        equal(ctrl, this);
     115                        equal(args.myKey, 'myVal');
    116116                });
    117117
    118118                ctrl.fire('MyEvent', {myKey: 'myVal'});
    119119
    120                 function countAndBreak(target, args) {
     120                function countAndBreak() {
    121121                        count++;
    122122                        return false;
    … …  
    124124
    125125                // Bind two events
    126                 ctrl.bind('MyEvent2', countAndBreak);
    127                 ctrl.bind('MyEvent2', countAndBreak);
     126                ctrl.on('MyEvent2', countAndBreak);
     127                ctrl.on('MyEvent2', countAndBreak);
    128128
    129129                // Check if only one of them was called
    … …  
    136136
    137137                // Unbind all
    138                 ctrl.unbind();
     138                ctrl.off();
    139139                count = 0;
    140140                ctrl.fire('MyEvent2', {myKey: 'myVal'});
    … …  
    142142
    143143                // Unbind by name
    144                 ctrl.bind('MyEvent1', countAndBreak);
    145                 ctrl.bind('MyEvent2', countAndBreak);
    146                 ctrl.unbind('MyEvent2');
     144                ctrl.on('MyEvent1', countAndBreak);
     145                ctrl.on('MyEvent2', countAndBreak);
     146                ctrl.off('MyEvent2');
    147147                count = 0;
    148148                ctrl.fire('MyEvent1', {myKey: 'myVal'});
    … …  
    151151
    152152                // Unbind by name callback
    153                 ctrl.bind('MyEvent1', countAndBreak);
    154                 ctrl.bind('MyEvent1', function() {count++;});
    155                 ctrl.unbind('MyEvent1', countAndBreak);
     153                ctrl.on('MyEvent1', countAndBreak);
     154                ctrl.on('MyEvent1', function() {count++;});
     155                ctrl.off('MyEvent1', countAndBreak);
    156156                count = 0;
    157157                ctrl.fire('MyEvent1', {myKey: 'myVal'});
    … …  
    159159
    160160                // Bind by named handler
    161                 ctrl.unbind();
    162                 ctrl.bind('MyEvent', 'handler1');
     161                ctrl.off();
     162                ctrl.on('MyEvent', 'handler1');
    163163                count = 0;
    164164                ctrl.fire('MyEvent', {myKey: 'myVal'});
    … …  
    169169                var ctrl = new tinymce.ui.Control({classes: 'class1 class2 class3'});
    170170
    171                 equal(ctrl.classes(), 'class1 class2 class3');
     171                equal(ctrl.classes(), 'mce-class1 mce-class2 mce-class3');
    172172                ok(ctrl.hasClass('class1'));
    173173                ok(ctrl.hasClass('class2'));
    … …  
    176176
    177177                ctrl.addClass('class4');
    178                 equal(ctrl.classes(), 'class1 class2 class3 class4');
     178                equal(ctrl.classes(), 'mce-class1 mce-class2 mce-class3 mce-class4');
    179179                ok(ctrl.hasClass('class1'));
    180180                ok(ctrl.hasClass('class2'));
    … …  
    183183
    184184                ctrl.removeClass('class4');
    185                 equal(ctrl.classes(), 'class1 class2 class3');
     185                equal(ctrl.classes(), 'mce-class1 mce-class2 mce-class3');
    186186                ok(ctrl.hasClass('class1'));
    187187                ok(ctrl.hasClass('class2'));
    … …  
    190190
    191191                ctrl.removeClass('class3').removeClass('class2');
    192                 equal(ctrl.classes(), 'class1');
     192                equal(ctrl.classes(), 'mce-class1');
    193193                ok(ctrl.hasClass('class1'));
    194194                ok(!ctrl.hasClass('class2'));
    … …  
    201201                ok(!ctrl.hasClass('class3'));
    202202        });
    203         */
     203
     204        test("encode", function() {
     205                tinymce.i18n.add('en', {'old': '"new"'});
     206                equal(new tinymce.ui.Control({}).encode('<>"&'), '&#60;&#62;&#34;&#38;');
     207                equal(new tinymce.ui.Control({}).encode('old'), '&#34;new&#34;');
     208                equal(new tinymce.ui.Control({}).encode('old', false), 'old');
     209        });
     210
     211        test("translate", function() {
     212                tinymce.i18n.add('en', {'old': 'new'});
     213                equal(new tinymce.ui.Control({}).translate('old'), 'new');
     214                equal(new tinymce.ui.Control({}).translate('old2'), 'old2');
     215        });
    204216})();
Note: See TracChangeset for help on using the changeset viewer.