From: Rick Waldron Date: Fri, 5 Aug 2011 14:02:33 +0000 (-0400) Subject: Fixes assertion counts and dom element fixture issue X-Git-Tag: 1.6.3rc1~23^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=13647e94e0141757a17c8445d398b64e70393b5c;p=jquery.git Fixes assertion counts and dom element fixture issue --- diff --git a/test/index.html b/test/index.html index a001e7435..4bbef54cd 100644 --- a/test/index.html +++ b/test/index.html @@ -229,6 +229,7 @@ Z
+
@@ -284,8 +285,6 @@ Z
- -
diff --git a/test/unit/attributes.js b/test/unit/attributes.js index 73e7750fc..eaaaa6235 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -6,7 +6,7 @@ var functionReturningObj = function(value) { return (function() { return value; test("jQuery.attrFix/jQuery.propFix integrity test", function() { expect(2); - + // This must be maintained and equal jQuery.attrFix when appropriate // Ensure that accidental or erroneous property // overwrites don't occur @@ -52,7 +52,7 @@ test("attr(String)", function() { equals( jQuery("
").attr("value"), "t", "Check setting custom attr named 'value' on a div" ); equals( jQuery("#form").attr("blah", "blah").attr("blah"), "blah", "Set non-existant attribute on a form" ); equals( jQuery("#foo").attr("height"), undefined, "Non existent height attribute should return undefined" ); - + // [7472] & [3113] (form contains an input with name="action" or name="id") var extras = jQuery("").appendTo("#testForm"); equals( jQuery("#form").attr("action","newformaction").attr("action"), "newformaction", "Check that action attribute was changed" ); @@ -62,7 +62,7 @@ test("attr(String)", function() { // Bug #3685 (form contains input with name="name") equals( jQuery("#testForm").attr("name"), undefined, "Retrieving name does not retrieve input with name=name" ); extras.remove(); - + equals( jQuery("#text1").attr("maxlength"), "30", "Check for maxlength attribute" ); equals( jQuery("#text1").attr("maxLength"), "30", "Check for maxLength attribute" ); equals( jQuery("#area1").attr("maxLength"), "30", "Check for maxLength attribute" ); @@ -255,7 +255,7 @@ test("attr(String, Object)", function() { commentNode = document.createComment("some comment"), textNode = document.createTextNode("some text"), obj = {}; - + jQuery.each( [commentNode, textNode, attributeNode], function( i, elem ) { var $elem = jQuery( elem ); $elem.attr( "nonexisting", "foo" ); @@ -295,7 +295,7 @@ test("attr(String, Object)", function() { j.removeAttr("name"); QUnit.reset(); - + // Type var type = jQuery("#check2").attr("type"); var thrown = false; @@ -457,7 +457,7 @@ test("removeAttr(String)", function() { equals( jQuery("#foo").attr("style", "position:absolute;").removeAttr("style").attr("style"), undefined, "Check removing style attribute" ); equals( jQuery("#form").attr("style", "position:absolute;").removeAttr("style").attr("style"), undefined, "Check removing style attribute on a form" ); equals( jQuery("#fx-test-group").attr("height", "3px").removeAttr("height").css("height"), "1px", "Removing height attribute has no effect on height set with style attribute" ); - + jQuery("#check1").removeAttr("checked").prop("checked", true).removeAttr("checked"); equals( document.getElementById("check1").checked, false, "removeAttr sets boolean properties to false" ); jQuery("#text1").prop("readOnly", true).removeAttr("readonly"); @@ -669,11 +669,11 @@ test("val()", function() { var $button = jQuery("").insertAfter("#button"); equals( $button.val(), "foobar", "Value retrieval on a button does not return innerHTML" ); equals( $button.val("baz").html(), "text", "Setting the value does not change innerHTML" ); - + equals( jQuery("