diff options
Diffstat (limited to 'test/unit/css.js')
-rw-r--r-- | test/unit/css.js | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/test/unit/css.js b/test/unit/css.js index a8ab36756..f80eea257 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -471,9 +471,6 @@ QUnit.test( "css(Object) where values are Functions with incoming values", funct jQuery( "#cssFunctionTest" ).remove(); } ); -// .show(), .hide(), can be excluded from the build -if ( jQuery.fn.show && jQuery.fn.hide ) { - QUnit.test( "show(); hide()", function( assert ) { assert.expect( 4 ); @@ -652,21 +649,8 @@ QUnit.test( "hide hidden elements (bug #7141)", function( assert ) { div.remove(); } ); -QUnit.test( "show() after hide() should always set display to initial value (#14750)", function( assert ) { - assert.expect( 1 ); - - var div = jQuery( "<div />" ), - fixture = jQuery( "#qunit-fixture" ); - - fixture.append( div ); - - div.css( "display", "inline" ).hide().show().css( "display", "list-item" ).hide().show(); - assert.equal( div.css( "display" ), "list-item", "should get last set display value" ); -} ); - -} +QUnit.test( "toggle()", function( assert ) { -QUnit[ jQuery.find.compile && jQuery.fn.toggle ? "test" : "skip" ]( "toggle()", function( assert ) { assert.expect( 9 ); var div, oldHide, x = jQuery( "#foo" ); @@ -1114,6 +1098,18 @@ QUnit.test( } ); +QUnit.test( "show() after hide() should always set display to initial value (#14750)", function( assert ) { + assert.expect( 1 ); + + var div = jQuery( "<div />" ), + fixture = jQuery( "#qunit-fixture" ); + + fixture.append( div ); + + div.css( "display", "inline" ).hide().show().css( "display", "list-item" ).hide().show(); + assert.equal( div.css( "display" ), "list-item", "should get last set display value" ); +} ); + // Support: IE < 11 // We have to jump through the hoops here in order to test work with "order" CSS property, // that some browsers do not support. This test is not, strictly speaking, correct, |