Created
July 26, 2018 11:56
-
-
Save mlewand/ee09f6dc0148792c8d08f53cc55da605 to your computer and use it in GitHub Desktop.
A sample code to break CKE4 mode creation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* bender-tags: editor,unit */ | |
/* bender-ckeditor-plugins: divarea */ | |
( function() { | |
'use strict'; | |
bender.test( { | |
// (#2257) | |
'test destroy editor on instance created': function() { | |
var editor = CKEDITOR.replace( 'destroyed' ), | |
wysiwygModeSpy; | |
editor.on( 'destroy', function() { | |
resume( function() { | |
assert.isFalse( wysiwygModeSpy.threw(), 'WYSIWYG mode function should not throw an exception' ); | |
} ); | |
} ); | |
editor.on( 'beforeSetMode', function() { | |
wysiwygModeSpy = sinon.spy( editor._.modes, 'wysiwyg' ); | |
editor.destroy(); | |
} ); | |
wait(); | |
} | |
} ); | |
} )(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment