blob: f780fb494e36f6daab111791537c3bf173cb2afc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
define( [
"jquery",
"ui/widgets/button"
], function( $ ) {
module( "Button: events" );
asyncTest( "Anchor recieves click event when spacebar is pressed", function() {
expect( 1 );
var element = $( "#anchor-button" ).button();
element.on( "click", function( event ) {
event.preventDefault();
ok( true, "click occcured as a result of spacebar" );
start();
} );
element.trigger( $.Event( "keyup", { keyCode: $.ui.keyCode.SPACE } ) );
} );
} );
|