window.Class = easejs.Class; window.Interface = easejs.Interface; // namespace window.rectest = { cases: {} }; $( document ).ready( function() { // display js-dependent content $( '.hasjs' ).removeClass( 'hasjs' ); listCases( rectest.cases, $( '#case' ) ); displayNotice( 'Please configure the test using the form below.' ); $( '#continue' ).click( function() { var runner = rectest.TestRunner( jQuery, rectest.TestRun ); var options = {}, values = [ 'case', 'set', 'interval', 'blank', 'samples', 'delay' ], i = values.length; while ( i-- ) { var id = values[ i ]; options[ id ] = $( '#' + id ).val(); } var testcase = rectest.cases[ options['case'] ].testCase(); $( this ).parent().hide(); runner.run( testcase, options, function( history ) { console.log( history ); console.log( 'done' ); } ); } ); function displayNotice( str ) { $( '.notice' ) .text( str ) .addClass( 'active' ); } function listCases( presets, $select ) { for ( var preset in presets ) { var data = presets[ preset ]; $select.append( $( '