File: save.js

package info (click to toggle)
ckeditor 4.4.4%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 25,632 kB
  • ctags: 2,419
  • sloc: sh: 190; python: 37; makefile: 29; php: 15; xml: 5
file content (26 lines) | stat: -rw-r--r-- 495 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* bender-tags: editor,unit */
/* bender-ckeditor-plugins: toolbar,save,wysiwygarea */

bender.test( {
	'test save event': function() {
		var editor = CKEDITOR.replace( 'editor' ),
			count = 0;

		editor.on( 'instanceReady', function() {
			editor.execCommand( 'save' );

			setTimeout( function() {
				resume( function() {
					assert.areSame( 1, count, 'save was fired once' );
				} );
			} );
		} );

		editor.on( 'save', function() {
			count++;
			return false;
		} );

		wait();
	}
} );