imported the whole jquery-ui package, refreshed with 1.10.2
[myslice.git] / third-party / jquery-ui-1.10.2 / tests / unit / menu / menu_test_helpers.js
1 (function() {
2
3 var lastItem,
4         log = [];
5
6 TestHelpers.menu = {
7         log: function( message, clear ) {
8                 if ( clear ) {
9                         log.length = 0;
10                 }
11                 if ( message === undefined ) {
12                         message = lastItem;
13                 }
14                 log.push( $.trim( message ) );
15         },
16
17         logOutput: function() {
18                 return log.join( "," );
19         },
20
21         clearLog: function() {
22                 log.length = 0;
23         },
24
25         click: function( menu, item ) {
26                 lastItem = item;
27                 menu.children( ":eq(" + item + ")" ).find( "a:first" ).trigger( "click" );
28         }
29 };
30
31 })();