Merge branch 'fix_suite_fails' of https://github.com/timmywil/jquery into timmywil-fix_suite_fails
This commit is contained in:
commit
f7f4ef91cf
4 changed files with 14 additions and 12 deletions
|
@ -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();
|
||||
|
|
|
@ -778,6 +778,8 @@ test("trigger() shortcuts", function() {
|
|||
elem.remove();
|
||||
|
||||
// test that special handlers do not blow up with VML elements (#7071)
|
||||
jQuery('<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v" />').appendTo('head');
|
||||
jQuery('<v:oval id="oval" style="width:100pt;height:75pt;" fillcolor="red"> </v:oval>').appendTo('#form');
|
||||
jQuery("#oval").click().keydown();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue