assets/ckeditor/tests/core/htmldataprocessor/htmldataprocessor.js
// regardless on how test is ran and in which place (htmlDP or editable) it is executed.
regardless on how test is ran and in which place (htmlDP or editable) it is executed.
regardless on how test is ran and in which place ( htmlDP or editable ) it is executed .
function addXssTC( tcs, name, input, output ) {
		name = 'test xss - ' + name;
		if ( tcs[ name ] )
			throw 'Test called "' + name + '" already exists.';
		input = input.replace( /%xss%/g, 'testXss()' );
		if ( output !== false )
			output = output ? output.replace( /%xss%/g, 'testXss()' ) : input;
		tcs[ name ] = function() {
			var editor = this.editors.editor2,
				xssed = false;
			window.testXss = function() {
				xssed = true;
			};
			this.editorBots.editor2.setData( input, function() {
				wait( function() {
					assert.isFalse( xssed, 'XSSed!' );
					if ( output !== false )
						assert.areSame( output.toLowerCase(), editor.getData().toLowerCase(), 'output is ok' );
				}, 10 );
			} );
		};
	}
function addXssTC ( tcs , name , input , output ) { name = 'test xss - ' + name ; if ( tcs [ name ] ) throw 'Test called "' + name + '" already exists.' ; input = input . replace ( / %xss% / g , 'testXss()' ) ; if ( output !== false ) output = output ? output . replace ( / %xss% / g , 'testXss()' ) : input ; tcs [ name ] = function ( ) { var editor = this . editors . editor2 , xssed = false ; window . testXss = function ( ) { xssed = true ; } ; this . editorBots . editor2 . setData ( input , function ( ) { wait ( function ( ) { assert . isFalse ( xssed , 'XSSed!' ) ; if ( output !== false ) assert . areSame ( output . toLowerCase ( ) , editor . getData ( ) . toLowerCase ( ) , 'output is ok' ) ; } , 10 ) ; } ) ; } ; }
regardless on how test is ran and in which place (htmlDP or editable) it is executed.
regardless on how test is ran and in which place ( htmlDP or editable ) it is executed .
// Wait, because onxxx may not be synchronous.