Ticket #4177: 4177.patch

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

     
    4242                test_config_inpage : function()
    4343                {
    4444                        // Pass in-page settings to the instance.
    45                         CKEDITOR.replace( 'editor2', { test1 : 'ball', baseHref : 'test' } );
     45                        var editor = CKEDITOR.replace( 'editor2', { test1 : 'ball', baseHref : 'test' } );
    4646
    47                         var config = CKEDITOR.instances.editor2.config;
     47                        editor.on( 'configLoaded', function()
     48                        {
     49                                this.resume( function()
     50                                {
     51
     52                                        var config = CKEDITOR.instances.editor2.config;
    4853
    49                         assert.areSame( 'ball', config.test1, '"test1" doesn\'t match' );
    50                         assert.areSame( 'test', config.baseHref, '"baseHref" doesn\'t match' );
     54                                        assert.areSame( 'ball', config.test1, '"test1" doesn\'t match' );
     55                                        assert.areSame( 'test', config.baseHref, '"baseHref" doesn\'t match' );
    5156
    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                         }
     57                                        // All other settings must match CKEDITOR.config.
     58                                        for ( var prop in CKEDITOR.config )
     59                                        {
     60                                                if ( prop != 'test1' && prop != 'baseHref' )
     61                                                        assert.areSame( CKEDITOR.config[ prop ], config[ prop ], '"' + prop + '" doesn\'t match' );
     62                                        }
     63                                } );
     64
     65                        }, this );
     66
     67                        this.wait();
     68
    5869                },
    5970
    6071                test_config_customConfig : function()
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy