diff options
author | John Resig <jeresig@gmail.com> | 2009-08-27 19:22:48 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2009-08-27 19:22:48 +0000 |
commit | 957cd6fb2a2b7b8cfe9ac6b3f2b3cc2bc8163449 (patch) | |
tree | cc2c7d228ca7ff133ee29942aababbdb1c5d91b7 /test/unit | |
parent | f52c4a3d5fb69f143d90f9a032e2a004c36ccae3 (diff) | |
download | jquery-957cd6fb2a2b7b8cfe9ac6b3f2b3cc2bc8163449.tar.gz jquery-957cd6fb2a2b7b8cfe9ac6b3f2b3cc2bc8163449.zip |
Tweaked the isXMLDoc iframe test case to test the document, not the body element (which doesn't exist in IE). Also made the isXMLDoc code handle cases where elem is null, undefined, etc.
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/core.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/core.js b/test/unit/core.js index b6dc2064f..8decd4943 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -280,10 +280,10 @@ test("isXMLDoc - HTML", function() { document.body.appendChild( iframe ); try { - var body = jQuery(iframe).contents().find("body")[0]; - ok( !jQuery.isXMLDoc( body ), "Iframe body element" ); + var body = jQuery(iframe).contents()[0]; + ok( jQuery.isXMLDoc( body ), "Iframe body element" ); } catch(e){ - ok( false, "Iframe body element" ); + ok( false, "Iframe body element exception" ); } document.body.removeChild( iframe ); |