aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2011-09-21 23:05:26 -0400
committerDave Methvin <dave.methvin@gmail.com>2011-09-21 23:05:26 -0400
commitd638aa9c6d6394db0c06431560b3d8b83cacc61c (patch)
tree95d9817d17be43e69c51186b127371c15952fd43 /test
parenta4cdbf09ee97471ec041d83ceb8f3feb9825b2a1 (diff)
parent2746d7f29976462499fa98181986f47c75258c94 (diff)
downloadjquery-d638aa9c6d6394db0c06431560b3d8b83cacc61c.tar.gz
jquery-d638aa9c6d6394db0c06431560b3d8b83cacc61c.zip
Allow more cases to use `innerHTML` in the `.html` method.
Thanks @cmcnulty for the pull and the patience!
Diffstat (limited to 'test')
-rw-r--r--test/unit/manipulation.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index 64c07498b..c60c3201d 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -991,7 +991,7 @@ test("clone() (#8070)", function () {
});
test("clone()", function() {
- expect(37);
+ expect(40);
equals( "This is a normal link: Yahoo", jQuery("#en").text(), "Assert text for #en" );
var clone = jQuery("#yahoo").clone();
equals( "Try them out:Yahoo", jQuery("#first").append(clone).text(), "Check for clone" );
@@ -1058,6 +1058,14 @@ test("clone()", function() {
cloneEvt.remove();
divEvt.remove();
+ // Test both html() and clone() for <embed and <object types
+ div = jQuery("<div/>").html('<embed height="355" width="425" src="http://www.youtube.com/v/3KANI2dpXLw&amp;hl=en"></embed>');
+
+ clone = div.clone(true);
+ equals( clone.length, 1, "One element cloned" );
+ equals( clone.html(), div.html(), "Element contents cloned" );
+ equals( clone[0].nodeName.toUpperCase(), "DIV", "DIV element cloned" );
+
// this is technically an invalid object, but because of the special
// classid instantiation it is the only kind that IE has trouble with,
// so let's test with it too.