@@ -1547,15 +1547,17 @@ QUnit.test( "animate should set display for disconnected nodes", function( asser
15471547 assert . expect ( 20 ) ;
15481548
15491549 var env = this ,
1550- methods = {
1551- toggle : [ 1 ] ,
1552- slideToggle : [ ] ,
1550+ showMethods = {
15531551 fadeIn : [ ] ,
15541552 fadeTo : [ "fast" , 0.5 ] ,
15551553 slideDown : [ "fast" ] ,
15561554 show : [ 1 ] ,
15571555 animate : [ { width : "show" } ]
15581556 } ,
1557+ toggleMethods = {
1558+ toggle : [ 1 ] ,
1559+ slideToggle : [ ]
1560+ } ,
15591561 $divEmpty = jQuery ( "<div/>" ) ,
15601562 $divTest = jQuery ( "<div>test</div>" ) ,
15611563 $divNone = jQuery ( "<div style='display: none;'/>" ) ,
@@ -1578,7 +1580,7 @@ QUnit.test( "animate should set display for disconnected nodes", function( asser
15781580
15791581 assert . expectJqData ( env , $divNone [ 0 ] , "olddisplay" ) ;
15801582
1581- jQuery . each ( methods , function ( name , opt ) {
1583+ jQuery . each ( showMethods , function ( name , opt ) {
15821584 jQuery . fn [ name ] . apply ( jQuery ( "<div/>" ) , opt . concat ( [ function ( ) {
15831585 assert . strictEqual ( jQuery ( this ) . css ( "display" ) , nullParentDisplay ,
15841586 "." + name + " block with null parentNode" ) ;
@@ -1589,6 +1591,17 @@ QUnit.test( "animate should set display for disconnected nodes", function( asser
15891591 "." + name + " block under fragment" ) ;
15901592 } ] ) ) ;
15911593 } ) ;
1594+ jQuery . each ( toggleMethods , function ( name , opt ) {
1595+ jQuery . fn [ name ] . apply ( jQuery ( "<div/>" ) , opt . concat ( [ function ( ) {
1596+ assert . strictEqual ( jQuery ( this ) . css ( "display" ) , "none" ,
1597+ "." + name + " block with null parentNode" ) ;
1598+ } ] ) ) ;
1599+
1600+ jQuery . fn [ name ] . apply ( jQuery ( "<div>test</div>" ) , opt . concat ( [ function ( ) {
1601+ assert . strictEqual ( jQuery ( this ) . css ( "display" ) , "none" ,
1602+ "." + name + " block under fragment" ) ;
1603+ } ] ) ) ;
1604+ } ) ;
15921605 clock . tick ( 400 ) ;
15931606} ) ;
15941607
0 commit comments