From 69866fd2e5ba2456c2ae84a5ba711a1db2a25091 Mon Sep 17 00:00:00 2001 From: timmywil Date: Tue, 12 Apr 2011 19:32:18 -0400 Subject: [PATCH] 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 --- test/data/testsuite.css | 3 +++ test/index.html | 5 ----- test/unit/attributes.js | 16 +++++++++------- test/unit/event.js | 2 ++ 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/test/data/testsuite.css b/test/data/testsuite.css index 0290068105..a9dd97ba45 100644 --- a/test/data/testsuite.css +++ b/test/data/testsuite.css @@ -109,3 +109,6 @@ div#show-tests * { display: none; } #nothiddendiv { font-size: 16px; } #nothiddendivchild.em { font-size: 2em; } #nothiddendivchild.prct { font-size: 150%; } + +/* For testing type on vml in IE #7071 */ +v\:oval { behavior:url(#default#VML); display:inline-block; } \ No newline at end of file diff --git a/test/index.html b/test/index.html index bf7dc7989e..a106550898 100644 --- a/test/index.html +++ b/test/index.html @@ -45,10 +45,6 @@ - - - - @@ -151,7 +147,6 @@

test element - Float test. diff --git a/test/unit/attributes.js b/test/unit/attributes.js index c78a2961f9..2bcc5046ea 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(""); - jQuery("#select1").val(valueObj( 4 )); - equals( jQuery("#select1").val(), "4", "Should be possible to set the val() to a newly created option" ); + $select1.append(""); + $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(); diff --git a/test/unit/event.js b/test/unit/event.js index 491396f93c..8ffbcd5b2a 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -778,6 +778,8 @@ test("trigger() shortcuts", function() { elem.remove(); // test that special handlers do not blow up with VML elements (#7071) + jQuery('').appendTo('head'); + jQuery(' ').appendTo('#form'); jQuery("#oval").click().keydown(); });