Ticket #4177: 4177_2.patch

File 4177_2.patch, 1.7 KB (added by Garry Yao, 15 years ago)
  • _source/tests/core/editor.html

     
    4141
    4242                test_config_inpage : function()
    4343                {
     44                        var self = this;
    4445                        // Pass in-page settings to the instance.
    45                         CKEDITOR.replace( 'editor2', { test1 : 'ball', baseHref : 'test' } );
     46                        var instanceConfig = { test1 : 'ball', baseHref : 'test' };
    4647
    47                         var config = CKEDITOR.instances.editor2.config;
     48                        CKEDITOR.tools.extend( instanceConfig,
     49                        {
     50                                'configLoaded': function()
     51                                {
     52                                        self.resume( function()
     53                                        {
     54                                                var config = CKEDITOR.instances.editor2.config;
    4855
    49                         assert.areSame( 'ball', config.test1, '"test1" doesn\'t match' );
    50                         assert.areSame( 'test', config.baseHref, '"baseHref" doesn\'t match' );
     56                                                assert.areSame( 'ball', config.test1, '"test1" doesn\'t match' );
     57                                                assert.areSame( 'test', config.baseHref, '"baseHref" doesn\'t match' );
    5158
    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                         }
     59                                                // All other settings must match CKEDITOR.config.
     60                                                for ( var prop in CKEDITOR.config )
     61                                                {
     62                                                        if ( prop != 'test1' && prop != 'baseHref' )
     63                                                                assert.areSame( CKEDITOR.config[ prop ], config[ prop ], '"' + prop + '" doesn\'t match' );
     64                                                }
     65                                        } );
     66                                }
     67                        } );
     68
     69                        var editor = CKEDITOR.replace( 'editor2', instanceConfig );
     70                        this.wait();
     71
    5872                },
    5973
    6074                test_config_customConfig : function()
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy