aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2011-09-19 16:42:36 -0400
committertimmywil <timmywillisn@gmail.com>2011-09-19 16:42:36 -0400
commit9ecdb2472be7661477564e46bce51432d4a5a84e (patch)
tree5059797d940cc0b009b30141b023caa2afcb5523 /test/unit
parentbba3d610c7e3b611fe1eb89178c91106a156a5dc (diff)
downloadjquery-9ecdb2472be7661477564e46bce51432d4a5a84e.tar.gz
jquery-9ecdb2472be7661477564e46bce51432d4a5a84e.zip
Landing pull request 490. 1.7 HTML5 Support for innerHTML, clone & style. Fixes #6485.
More Details: - https://github.com/jquery/jquery/pull/490 - http://bugs.jquery.com/ticket/6485
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/manipulation.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index 4017cf196..3de3fa0b9 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -465,6 +465,38 @@ test("append the same fragment with events (Bug #6997, 5566)", function () {
jQuery("#listWithTabIndex li.test6997").eq(1).click();
});
+test("append HTML5 sectioning elements (Bug #6485)", function () {
+ expect(2);
+
+ jQuery("#qunit-fixture").append("<article style='font-size:10px'><section><aside>HTML5 elements</aside></section></article>");
+
+ var article = jQuery("article"),
+ aside = jQuery("aside");
+
+ equal( article.css("fontSize"), "10px", 'HTML5 elements are styleable');
+ equal( aside.length, 1, 'HTML5 elements do not collapse their children')
+});
+
+test("clone() (#6485)", function () {
+ expect(1);
+
+ jQuery("<article><section><aside>HTML5 elements</aside></section></article>").appendTo("#qunit-fixture");
+
+ var clone = jQuery("article").clone();
+
+ jQuery("#qunit-fixture").append( clone );
+
+ equal( jQuery("aside").length, 2, "clone()ing HTML5 elems does not collapse them" );
+});
+
+test("html(String) with HTML5 (Bug #6485)", function() {
+ expect(2);
+
+ jQuery("#qunit-fixture").html("<article><section><aside>HTML5 elements</aside></section></article>");
+ equal( jQuery("#qunit-fixture").children().children().length, 1, "Make sure HTML5 article elements can hold children. innerHTML shortcut path" );
+ equal( jQuery("#qunit-fixture").children().children().children().length, 1, "Make sure nested HTML5 elements can hold children." );
+});
+
test("append(xml)", function() {
expect( 1 );