whitespace fix for event core tests

This commit is contained in:
John Bender 2011-06-20 13:21:02 -07:00
parent 40b1e16693
commit 66fc726321

View file

@ -69,8 +69,6 @@
$('#qunit-fixture').touchstart();
stop();
});
test( "defining event functions sets the attrFn to true", function(){
$.each(events, function(i, name){
@ -380,9 +378,9 @@
returnValue: undefined //NOTE result of unbind function call
});
});
/* The following 4 tests are async so that the throttled event triggers don't interfere with subsequent tests */
asyncTest( "throttledresize event proxies resize events", function(){
var called = false;
$(window).bind( "throttledresize", function(){
@ -390,12 +388,12 @@
});
$(window).trigger("resize");
setTimeout(function(){
ok( called );
$(window).unbind( "throttledresize" );
setTimeout(start, 500);
}, 500);
}, 500);
});
asyncTest( "throttledresize event prevents resize events from firing more frequently than 250ms", function(){
@ -405,17 +403,17 @@
});
$(window).trigger( "resize" ).trigger( "resize" );
setTimeout(function(){
ok( called == 1 );
$(window).unbind( "throttledresize" );
setTimeout(start, 500);
}, 100);
}, 100);
});
asyncTest( "throttledresize event promises that a held call will execute after trottled timeout", function(){
var called = 0;
var called = 0;
$(window).bind( "throttledresize", function(){
called ++;
});
@ -424,24 +422,23 @@
setTimeout(function(){
ok( called == 2 );
$(window).unbind( "throttledresize" );
setTimeout(start, 500);
}, 500);
});
setTimeout(start, 500);
}, 500);
});
asyncTest( "throttledresize event promises that a held call will execute only once after trottled timeout", function(){
var called = 0;
var called = 0;
$(window).bind( "throttledresize", function(){
called ++;
});
$(window).trigger( "resize" ).trigger( "resize" ).trigger( "resize" );
setTimeout(function(){
ok( called == 2 );
$(window).unbind( "throttledresize" );
setTimeout(start, 500);
}, 500);
setTimeout(start, 500);
}, 500);
});
})(jQuery);