diff options
author | George Kats <katsgeorgeek@gmail.com> | 2013-10-06 19:53:26 +0300 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-10-15 12:28:25 -0400 |
commit | 5ce4b06c285bd8cf52eaff0f39e0b9192a927873 (patch) | |
tree | f7c1189ccd2daeb4bd08a3ab8ec11776d26530fe /test/unit/css.js | |
parent | b24a3d5368ab1243ac43c773b318519da2f0ae7b (diff) | |
download | jquery-5ce4b06c285bd8cf52eaff0f39e0b9192a927873.tar.gz jquery-5ce4b06c285bd8cf52eaff0f39e0b9192a927873.zip |
Fix #14432: Always return string from .css("z-index"). Close gh-1395.
Diffstat (limited to 'test/unit/css.js')
-rw-r--r-- | test/unit/css.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/unit/css.js b/test/unit/css.js index 460e5d60b..cd70adbfc 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -197,6 +197,16 @@ test( "css() explicit and relative values", 29, function() { equal( $elem.css("opacity"), "1", "'+=0.5' on opacity (params)" ); }); +test("css(String) where values are z-index", function() { + expect(1); + + var $elem = jQuery( "<div>" ).appendTo( "#qunit-fixture" ); + + $elem.css({ "position": "absolute", "z-index": "1000" }); + strictEqual( $elem.css( "z-index" ), "1000" ); +}); + + test("css(String, Object)", function() { expect( 19 ); var j, div, display, ret, success; @@ -353,6 +363,14 @@ test("css(Object) where values are Functions", function() { jQuery("#cssFunctionTest").remove(); }); +test("css(String) where values are undefined", function() { + expect(1); + + var $elem = jQuery( "#nothiddendiv" ); + + strictEqual( $elem.css( "test" ), undefined ); +}); + test("css(Object) where values are Functions with incoming values", function() { expect(3); |