diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2012-06-10 21:54:16 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-06-10 21:54:16 -0400 |
commit | 5f35b3d9f90d07ee084d59702a54051ee51fb0d3 (patch) | |
tree | 7c412b9602b6a3a48435f5adb1d3c84b97bd20dc /test/unit/selector.js | |
parent | 1bb1432fe995881821f433c5b7bf86c61f3b3f50 (diff) | |
download | jquery-5f35b3d9f90d07ee084d59702a54051ee51fb0d3.tar.gz jquery-5f35b3d9f90d07ee084d59702a54051ee51fb0d3.zip |
Fix #11857. Modularize css.js, add dependency management. Closes gh-816.
See the pull request for more info on the dependency management details.
Diffstat (limited to 'test/unit/selector.js')
-rw-r--r-- | test/unit/selector.js | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/test/unit/selector.js b/test/unit/selector.js index f4a5f4954..5bea3215e 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -34,26 +34,28 @@ test("attributes - jQuery only", function() { t( "Find elements with a tabindex attribute", "[tabindex]", ["listWithTabIndex", "foodWithNegativeTabIndex", "linkWithTabIndex", "linkWithNegativeTabIndex", "linkWithNoHrefWithTabIndex", "linkWithNoHrefWithNegativeTabIndex"] ); }); -test("pseudo - visibility", function() { - expect( 9 ); - - t( "Is Visible", "div:visible:not(#qunit-testrunner-toolbar):lt(2)", ["nothiddendiv", "nothiddendivchild"] ); - t( "Is Not Hidden", "#qunit-fixture:hidden", [] ); - t( "Is Hidden", "#form input:hidden", ["hidden1","hidden2"] ); - - var $div = jQuery('<div/>').appendTo("body"); - $div.css({ fontSize: 0, lineHeight: 0 });// IE also needs to set font-size and line-height to 0 - $div.css( "width", 1 ).css( "height", 0 ); - t( "Is Visible", '#nothiddendivchild:visible', ['nothiddendivchild'] ); - t( "Is Not Visible", '#nothiddendivchild:hidden', [] ); - $div.css( "width", 0 ).css( "height", 1 ); - t( "Is Visible", '#nothiddendivchild:visible', ['nothiddendivchild'] ); - t( "Is Not Visible", '#nothiddendivchild:hidden', [] ); - $div.css( "width", 1 ).css( "height", 1 ); - t( "Is Visible", '#nothiddendivchild:visible', ['nothiddendivchild'] ); - t( "Is Not Visible", '#nothiddendivchild:hidden', [] ); - $div.remove(); -}); +if ( jQuery.css ) { + test("pseudo - visibility", function() { + expect( 9 ); + + t( "Is Visible", "div:visible:not(#qunit-testrunner-toolbar):lt(2)", ["nothiddendiv", "nothiddendivchild"] ); + t( "Is Not Hidden", "#qunit-fixture:hidden", [] ); + t( "Is Hidden", "#form input:hidden", ["hidden1","hidden2"] ); + + var $div = jQuery('<div/>').appendTo("body"); + $div.css({ fontSize: 0, lineHeight: 0 });// IE also needs to set font-size and line-height to 0 + $div.css( "width", 1 ).css( "height", 0 ); + t( "Is Visible", '#nothiddendivchild:visible', ['nothiddendivchild'] ); + t( "Is Not Visible", '#nothiddendivchild:hidden', [] ); + $div.css( "width", 0 ).css( "height", 1 ); + t( "Is Visible", '#nothiddendivchild:visible', ['nothiddendivchild'] ); + t( "Is Not Visible", '#nothiddendivchild:hidden', [] ); + $div.css( "width", 1 ).css( "height", 1 ); + t( "Is Visible", '#nothiddendivchild:visible', ['nothiddendivchild'] ); + t( "Is Not Visible", '#nothiddendivchild:hidden', [] ); + $div.remove(); + }); +} test("disconnected nodes", function() { expect( 4 ); |