File: aria.js

package info (click to toggle)
ckeditor 4.19.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 290,372 kB
  • sloc: javascript: 242,409; sh: 202; makefile: 64; python: 37; php: 15; xml: 5
file content (43 lines) | stat: -rw-r--r-- 938 bytes parent folder | download | duplicates (2)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* bender-tags: editor */
/* bender-ckeditor-plugins: toolbar,sourcearea */
/* bender-include: ../button/_helpers/buttontools.js */
/* global buttonTools */

( function() {
	bender.editor = true;

	// (#2444)
	var tests = buttonTools.createAriaPressedTests( 'test_editor', [
		'Source'
	] );

	tests[ 'test updating [aria-pressed] attribute while changing editor\'s mode' ] = function() {
		var editor = this.editor,
			button = buttonTools.getUiItem( editor, 'Source' ),
			sourceExpected = {
				'aria-pressed': 'true'
			},
			wysiwygExpected = {
				'aria-pressed': 'false'
			};

		editor.setMode( 'source', function() {
			resume( function() {
				buttonTools.assertAttributes( sourceExpected, button );

				editor.setMode( 'wysiwyg', function() {
					resume( function() {
						buttonTools.assertAttributes( wysiwygExpected, button );
					} );
				} );

				wait();
			} );
		} );

		wait();
	};

	bender.test( tests );
} )();