diff --git a/test/data/testinit.js b/test/data/testinit.js index af19dc69d..06f33d19b 100644 --- a/test/data/testinit.js +++ b/test/data/testinit.js @@ -131,8 +131,8 @@ fireNative = document.createEvent ? * @result "data/test.php?foo=bar&10538358345554" */ function url( value ) { - return baseURL + value + (/\?/.test(value) ? "&" : "?") + - new Date().getTime() + "" + parseInt(Math.random() * 100000, 10); + return baseURL + value + (/\?/.test( value ) ? "&" : "?") + + new Date().getTime() + "" + parseInt( Math.random() * 100000, 10 ); } // Ajax testing helper @@ -203,19 +203,17 @@ this.ajaxTest = function( title, expect, options ) { this.testIframe = function( fileName, name, fn ) { - - test(name, function() { - // pause execution for now - stop(); + asyncTest(name, function() { // load fixture in iframe var iframe = loadFixture(), win = iframe.contentWindow, - interval = setInterval( function() { + interval = setInterval(function() { if ( win && win.jQuery && win.jQuery.isReady ) { clearInterval( interval ); - // continue + start(); + // call actual tests passing the correct jQuery instance to use fn.call( this, win.jQuery, win, win.document ); document.body.removeChild( iframe ); @@ -225,9 +223,10 @@ this.testIframe = function( fileName, name, fn ) { }); function loadFixture() { - var src = url("./data/" + fileName + ".html"), - iframe = jQuery("