diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2015-05-05 08:33:50 -0700 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2015-05-05 09:00:41 -0700 |
commit | dc49f62f22a90ba95bbd1b659bfdae905adb4dd8 (patch) | |
tree | 0cdfb567975c3c478d8d5bad8168beca13d1da60 /test/unit | |
parent | a2386a8250c82e27680d21f7f6fd1eb9a8f7e938 (diff) | |
download | jquery-dc49f62f22a90ba95bbd1b659bfdae905adb4dd8.tar.gz jquery-dc49f62f22a90ba95bbd1b659bfdae905adb4dd8.zip |
Offset: allow offset setter to throw for disconnected elements
Fixes gh-2114
Diffstat (limited to 'test/unit')
-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 f1a302784..39e61fcb6 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"); |