diff options
author | timmywil <tim.willison@thisismedium.com> | 2011-03-13 21:27:45 -0400 |
---|---|---|
committer | timmywil <tim.willison@thisismedium.com> | 2011-04-03 19:13:39 -0400 |
commit | dbe3b7a9d052b7bf0c73ead1ecd43a40152416a0 (patch) | |
tree | f76c02920bea4a7feb58a097fd23c90a8899a23c /test | |
parent | f578e0f99748ec5ae84d750f0922957e5fea25cb (diff) | |
download | jquery-dbe3b7a9d052b7bf0c73ead1ecd43a40152416a0.tar.gz jquery-dbe3b7a9d052b7bf0c73ead1ecd43a40152416a0.zip |
Style edits according to comments from John and rwaldron.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/attributes.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js index d32935455..8b483dccb 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -3,6 +3,31 @@ module("attributes", { teardown: moduleTeardown }); var bareObj = function(value) { return value; }; var functionReturningObj = function(value) { return (function() { return value; }); }; +if ( !jQuery.support.getSetAttribute ) { + test("jQuery.attrFix integrity test", function() { + expect(1); + + // This must be maintained and equal jQuery.attrFix when appropriate + // Ensure that accidental or erroneous property + // overwrites don't occur + // This is simply for better code coverage and future proofing. + var propsShouldBe = { + "for": "htmlFor", + "class": "className", + readonly: "readOnly", + maxlength: "maxLength", + cellspacing: "cellSpacing", + rowspan: "rowSpan", + colspan: "colSpan", + tabindex: "tabIndex", + usemap: "useMap", + frameborder: "frameBorder" + }; + + same(propsShouldBe, jQuery.attrFix, "jQuery.attrFix passes integrity check"); + }); +} + test("prop", function() { equals( jQuery('#text1').prop('value'), "Test", 'Check for value attribute' ); equals( jQuery('#text1').prop('value', "Test2").prop('defaultValue'), "Test", 'Check for defaultValue attribute' ); |