Ticket #4177: 4177_4.patch

File 4177_4.patch, 1.7 KB (added by Frederico Caldeira Knabben, 15 years ago)
  • _source/tests/core/editor.html

     
    4141
    4242                test_config_inpage : function()
    4343                {
    44                         // Pass in-page settings to the instance.
    45                         CKEDITOR.replace( 'editor2', { test1 : 'ball', baseHref : 'test' } );
     44                        var self = this;
    4645
    47                         var config = CKEDITOR.instances.editor2.config;
     46                        CKEDITOR.replace( 'editor2',
     47                                {
     48                                        // The custom setting to be checked.
     49                                        test1 : 'ball',
     50                                        baseHref : 'test',
    4851
    49                         assert.areSame( 'ball', config.test1, '"test1" doesn\'t match' );
    50                         assert.areSame( 'test', config.baseHref, '"baseHref" doesn\'t match' );
     52                                        on :
     53                                        {
     54                                                instanceReady : function()
     55                                                {
     56                                                        self.resume( function()
     57                                                        {
     58                                                                var config = CKEDITOR.instances.editor2.config;
    5159
    52                         // All other settings must match CKEDITOR.config.
    53                         for ( var prop in CKEDITOR.config )
    54                         {
    55                                 if ( prop != 'test1' && prop != 'baseHref' )
    56                                         assert.areSame( CKEDITOR.config[ prop ], config[ prop ], '"' + prop + '" doesn\'t match' );
    57                         }
     60                                                                assert.areSame( 'ball', config.test1, '"test1" doesn\'t match' );
     61                                                                assert.areSame( 'test', config.baseHref, '"baseHref" doesn\'t match' );
     62
     63                                                                // All other settings must match CKEDITOR.config.
     64                                                                for ( var prop in CKEDITOR.config )
     65                                                                {
     66                                                                        if ( prop != 'test1' && prop != 'baseHref' )
     67                                                                                assert.areSame( CKEDITOR.config[ prop ], config[ prop ], '"' + prop + '" doesn\'t match' );
     68                                                                }
     69                                                        } );
     70                                                }
     71                                        }
     72                                });
     73
     74                        this.wait();
    5875                },
    5976
    6077                test_config_customConfig : function()
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy