diff options
author | timmywil <tim.willison@thisismedium.com> | 2011-04-12 19:32:18 -0400 |
---|---|---|
committer | timmywil <tim.willison@thisismedium.com> | 2011-04-12 19:32:18 -0400 |
commit | 69866fd2e5ba2456c2ae84a5ba711a1db2a25091 (patch) | |
tree | 5c0a9ed277ba1ac936b5ac9add3d5242f5966a33 /test/unit/attributes.js | |
parent | 6d49e84dafd8990221913944727e4f5dcaec078d (diff) | |
download | jquery-69866fd2e5ba2456c2ae84a5ba711a1db2a25091.tar.gz jquery-69866fd2e5ba2456c2ae84a5ba711a1db2a25091.zip |
VML.type test was causing multiple test suite fails, fix attributes.js fail in IE6 where the val(String/Number) tests were interfering with the val(Function) tests
Diffstat (limited to 'test/unit/attributes.js')
-rw-r--r-- | test/unit/attributes.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js index c78a2961f..2bcc5046e 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -492,6 +492,7 @@ test("val()", function() { var testVal = function(valueObj) { expect(8); + QUnit.reset(); jQuery("#text1").val(valueObj( "test" )); equals( document.getElementById("text1").value, "test", "Check for modified (via val(String)) value of input element" ); @@ -504,15 +505,16 @@ var testVal = function(valueObj) { jQuery("#text1").val(valueObj( null )); equals( document.getElementById("text1").value, "", "Check for modified (via val(null)) value of input element" ); - jQuery("#select1").val(valueObj( "3" )); - equals( jQuery("#select1").val(), "3", "Check for modified (via val(String)) value of select element" ); + var $select1 = jQuery("#select1"); + $select1.val(valueObj( "3" )); + equals( $select1.val(), "3", "Check for modified (via val(String)) value of select element" ); - jQuery("#select1").val(valueObj( 2 )); - equals( jQuery("#select1").val(), "2", "Check for modified (via val(Number)) value of select element" ); + $select1.val(valueObj( 2 )); + equals( $select1.val(), "2", "Check for modified (via val(Number)) value of select element" ); - jQuery("#select1").append("<option value='4'>four</option>"); - jQuery("#select1").val(valueObj( 4 )); - equals( jQuery("#select1").val(), "4", "Should be possible to set the val() to a newly created option" ); + $select1.append("<option value='4'>four</option>"); + $select1.val(valueObj( 4 )); + equals( $select1.val(), "4", "Should be possible to set the val() to a newly created option" ); // using contents will get comments regular, text, and comment nodes var j = jQuery("#nonnodes").contents(); |