Added a fix and test for bug #978 (Appending elements into an IFrame, in IE).
[jquery.git] / src / jquery / coreTest.js
index 8961300..5c982ee 100644 (file)
@@ -316,7 +316,7 @@ test("wrap(String|Element)", function() {
 });\r
 \r
 test("append(String|Element|Array<Element>|jQuery)", function() {\r
-       expect(11);\r
+       expect(12);\r
        var defaultText = 'Try them out:'\r
        var result = $('#first').append('<b>buga</b>');\r
        ok( result.text() == defaultText + 'buga', 'Check if text appending works' );\r
@@ -353,6 +353,16 @@ test("append(String|Element|Array&lt;Element&gt;|jQuery)", function() {
        reset();\r
        $("#sap").append(document.getElementById('form'));\r
        ok( $("#sap>form").size() == 1, "Check for appending a form" );  // Bug #910\r
+\r
+       reset();\r
+       var pass = true;\r
+       try {\r
+               $( $("iframe")[0].contentWindow.document.body ).append("<div>test</div>");\r
+       } catch(e) {\r
+               pass = false;\r
+       }\r
+\r
+       ok( pass, "Test for appending a DOM node to the contents of an IFrame" );\r
        \r
 });\r
 \r