aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md33
1 files changed, 13 insertions, 20 deletions
diff --git a/README.md b/README.md
index 404a26885..5c1a90c04 100644
--- a/README.md
+++ b/README.md
@@ -340,32 +340,25 @@ url("data/test.php?foo=bar");
```
-### Load tests in an iframe ###
-
-Loads a given page constructing a url with fileName: `"./data/" + fileName + ".html"`
-and fires the given callback on jQuery ready (using the jQuery loading from that page)
-and passes the iFrame's jQuery to the callback.
-
-```js
-testIframe( fileName, testName, callback );
-```
-
-Callback arguments:
+### Load tests in an iframe (window.iframeCallback) ###
```js
-callback( jQueryFromIFrame, iFrameWindow, iFrameDocument );
+testIframeWithCallback( testName, fileName,
+ function callback( arg1, arg2, ... assert ) {
+ ...
+ } );
```
-### Load tests in an iframe (window.iframeCallback) ###
-
Loads a given page constructing a url with fileName: `"./data/" + fileName + ".html"`
-The given callback is fired when window.iframeCallback is called by the page.
-The arguments passed to the callback are the same as the
-arguments passed to window.iframeCallback, whatever that may be.
+The iframe page is responsible for determining when `window.parent.iframeCallback`
+should be called, for example at document ready or window.onload time.
+Arguments passed to the callback are the same as the arguments passed
+to `window.parent.iframeCallback` by the iframe, plus the QUnit `assert`
+object from the `QUnit.test()` that this wrapper sets up for you.
+The iframe should send any objects needed by the unit test via arguments, for example
+its `jQuery`, `window`, and `document` objects from the iframe.
+
-```js
-testIframeWithCallback( testName, fileName, callback );
-```
Questions?
----------