aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/offset.js
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2012-06-05 16:38:18 -0400
committerRick Waldron <waldron.rick@gmail.com>2012-06-05 16:38:18 -0400
commite680f36ca096090a6e699ce0eece5b3635a46f47 (patch)
tree5292f7cd02f177e5306e8532730976342059ba9b /test/unit/offset.js
parent3225d6149655f68939111ffc76a1dffeb329afe9 (diff)
downloadjquery-e680f36ca096090a6e699ce0eece5b3635a46f47.tar.gz
jquery-e680f36ca096090a6e699ce0eece5b3635a46f47.zip
Fix busted tests that relied on width in 2nd param to jQuery(), dimensions stays modular. (core, attributes, offset)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Diffstat (limited to 'test/unit/offset.js')
-rw-r--r--test/unit/offset.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/unit/offset.js b/test/unit/offset.js
index 6664a6bdb..750228281 100644
--- a/test/unit/offset.js
+++ b/test/unit/offset.js
@@ -14,13 +14,16 @@ var supportsScroll = false;
testIframe("offset/absolute", "absolute", function($, iframe) {
expect(4);
- var doc = iframe.document, tests;
+ var doc = iframe.document,
+ tests, forceScroll;
// force a scroll value on the main window
// this insures that the results will be wrong
// if the offset method is using the scroll offset
// of the parent window
- var forceScroll = jQuery("<div>", { width: 2000, height: 2000 }).appendTo("body");
+ forceScroll = jQuery("<div>").css({ width: 2000, height: 2000 });
+ forceScroll.appendTo("body");
+
window.scrollTo(200, 200);
if ( document.documentElement.scrollTop || document.body.scrollTop ) {