@@ -340,32 +340,25 @@ url("data/test.php?foo=bar");
340340```
341341
342342
343- ### Load tests in an iframe ###
344-
345- Loads a given page constructing a url with fileName: ` "./data/" + fileName + ".html" `
346- and fires the given callback on jQuery ready (using the jQuery loading from that page)
347- and passes the iFrame's jQuery to the callback.
348-
349- ``` js
350- testIframe ( fileName, testName, callback );
351- ```
352-
353- Callback arguments:
343+ ### Load tests in an iframe (window.iframeCallback) ###
354344
355345``` js
356- callback ( jQueryFromIFrame, iFrameWindow, iFrameDocument );
346+ testIframeWithCallback ( testName, fileName,
347+ function callback ( arg1 , arg2 , ... assert ) {
348+ ...
349+ } );
357350```
358351
359- ### Load tests in an iframe (window.iframeCallback) ###
360-
361352Loads a given page constructing a url with fileName: ` "./data/" + fileName + ".html" `
362- The given callback is fired when window.iframeCallback is called by the page.
363- The arguments passed to the callback are the same as the
364- arguments passed to window.iframeCallback, whatever that may be.
353+ The iframe page is responsible for determining when ` window.parent.iframeCallback `
354+ should be called, for example at document ready or window.onload time.
355+ Arguments passed to the callback are the same as the arguments passed
356+ to ` window.parent.iframeCallback ` by the iframe, plus the QUnit ` assert `
357+ object from the ` QUnit.test() ` that this wrapper sets up for you.
358+ The iframe should send any objects needed by the unit test via arguments, for example
359+ its ` jQuery ` , ` window ` , and ` document ` objects from the iframe.
360+
365361
366- ``` js
367- testIframeWithCallback ( testName, fileName, callback );
368- ```
369362
370363Questions?
371364----------
0 commit comments