aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/offset.js
diff options
context:
space:
mode:
authorNowres Rafid <nowres.rafed@gmail.com>2012-07-06 09:58:34 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-07-06 10:01:32 -0400
commitaaf134bb7092efe7b450fc08ca5cc3c53cb00d76 (patch)
tree633a1527c42fd99a1d0bcd6ca683440371c0d940 /test/unit/offset.js
parent05aff402310d7db5d15f96b15071af6aa21a2afc (diff)
downloadjquery-aaf134bb7092efe7b450fc08ca5cc3c53cb00d76.tar.gz
jquery-aaf134bb7092efe7b450fc08ca5cc3c53cb00d76.zip
Fix #8482, offsetParent should not return null. Closes gh-847.
Diffstat (limited to 'test/unit/offset.js')
-rw-r--r--test/unit/offset.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/unit/offset.js b/test/unit/offset.js
index 972c49f7c..6a6cbcff5 100644
--- a/test/unit/offset.js
+++ b/test/unit/offset.js
@@ -440,7 +440,7 @@ test("chaining", function() {
});
test("offsetParent", function(){
- expect(11);
+ expect(12);
var body = jQuery("body").offsetParent();
equal( body.length, 1, "Only one offsetParent found." );
@@ -464,6 +464,9 @@ test("offsetParent", function(){
equal( div.length, 2, "Two offsetParent found." );
equal( div[0], document.body, "The body is the offsetParent." );
equal( div[1], jQuery("#nothiddendiv")[0], "The div is the offsetParent." );
+
+ var area = jQuery("#imgmap area").offsetParent();
+ equal( area[0], document.body, "The body is the offsetParent." );
});
test("fractions (see #7730 and #7885)", function() {