Ticket #4177: 4177_2.patch
File 4177_2.patch, 1.7 KB (added by , 15 years ago) |
---|
-
_source/tests/core/editor.html
41 41 42 42 test_config_inpage : function() 43 43 { 44 var self = this; 44 45 // Pass in-page settings to the instance. 45 CKEDITOR.replace( 'editor2', { test1 : 'ball', baseHref : 'test' } );46 var instanceConfig = { test1 : 'ball', baseHref : 'test' }; 46 47 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; 48 55 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' ); 51 58 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 58 72 }, 59 73 60 74 test_config_customConfig : function()