diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2015-05-05 08:33:50 -0700 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2015-05-05 08:53:17 -0700 |
commit | 0d11c1182f2012cd6eb06ce1e3fa5a495af9bee3 (patch) | |
tree | 82a78d6aa75943efdca5301d078190eb2635f772 /test | |
parent | 6176567361e9d05d4f5eb7e98735a678f2cd7ea9 (diff) | |
download | jquery-0d11c1182f2012cd6eb06ce1e3fa5a495af9bee3.tar.gz jquery-0d11c1182f2012cd6eb06ce1e3fa5a495af9bee3.zip |
Offset: allow offset setter to throw for disconnected elements
Fixes gh-2114
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/core.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/test/unit/core.js b/test/unit/core.js index b355611d4..0a018dea4 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -36,10 +36,6 @@ test("jQuery()", function() { expected++; attrObj["width"] = 10; } - if ( jQuery.fn.offset ) { - expected++; - attrObj["offset"] = { "top": 1, "left": 1 }; - } if ( jQuery.fn.css ) { expected += 2; attrObj["css"] = { "paddingLeft": 1, "paddingRight": 1 }; @@ -105,16 +101,12 @@ test("jQuery()", function() { elem = jQuery("\n\n<em>world</em>")[0]; equal( elem.nodeName.toLowerCase(), "em", "leading newlines" ); - elem = jQuery("<div/>", attrObj ); + elem = jQuery( "<div/>", attrObj ); if ( jQuery.fn.width ) { equal( elem[0].style.width, "10px", "jQuery() quick setter width"); } - if ( jQuery.fn.offset ) { - equal( elem[0].style.top, "1px", "jQuery() quick setter offset"); - } - if ( jQuery.fn.css ) { equal( elem[0].style.paddingLeft, "1px", "jQuery quick setter css"); equal( elem[0].style.paddingRight, "1px", "jQuery quick setter css"); |