aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorBrandon Aaron <brandon.aaron@gmail.com>2008-11-10 02:39:03 +0000
committerBrandon Aaron <brandon.aaron@gmail.com>2008-11-10 02:39:03 +0000
commit5c21e44fce5335cfe1bb4989006900476f2c75ca (patch)
tree08c09b2f9ca004b7a25217438894dfadfc2aa5bd /test/unit
parentb64d60940d7e66eb636e255b51ea5020c0399524 (diff)
downloadjquery-5c21e44fce5335cfe1bb4989006900476f2c75ca.tar.gz
jquery-5c21e44fce5335cfe1bb4989006900476f2c75ca.zip
new offset method, faster and no more browser detection
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/offset.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/unit/offset.js b/test/unit/offset.js
index 8eacec9d4..096bcb5e9 100644
--- a/test/unit/offset.js
+++ b/test/unit/offset.js
@@ -126,10 +126,10 @@ if ( !jQuery.browser.msie || (jQuery.browser.msie && parseInt(jQuery.browser.ver
var $w = testwin["fixed"].$;
equals( $w('#fixed-1').offset().top, 1001, "jQuery('#fixed-1').offset().top" );
- equals( $w('#fixed-1').offset().left, jQuery.browser.msie ? 994 : 1001, "jQuery('#fixed-1').offset().left" );
+ equals( $w('#fixed-1').offset().left, 1001, "jQuery('#fixed-1').offset().left" );
equals( $w('#fixed-2').offset().top, 1021, "jQuery('#fixed-2').offset().top" );
- equals( $w('#fixed-2').offset().left, jQuery.browser.msie ? 1014 : 1021, "jQuery('#fixed-2').offset().left" );
+ equals( $w('#fixed-2').offset().left, 1021, "jQuery('#fixed-2').offset().left" );
testwin["fixed"].close();
});
@@ -161,4 +161,13 @@ testwin("scroll", function() {
equals( $w('#scroll-1-1').offset().left, 11, "jQuery('#scroll-1-1').offset().left" );
testwin["scroll"].close();
+});
+
+testwin("body", function() {
+ var $w = testwin["body"].$;
+
+ equals( $w('body').offset().top, 1, "jQuery('#body').offset().top" );
+ equals( $w('body').offset().left, 1, "jQuery('#body').offset().left" );
+
+ testwin["body"].close();
}); \ No newline at end of file