aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/offset.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2011-04-12 00:25:36 -0400
committerjeresig <jeresig@gmail.com>2011-04-12 00:25:36 -0400
commit0d755dff13ae36a9b2f79ecbb0db05dd2c322e42 (patch)
tree019580c604c385266bafb31a6d5fedcd9650b308 /test/unit/offset.js
parentea6987e078cedb1a4a8012b8e98b5f245417407b (diff)
parent75655e5758bc786989f26a98b09aabbfb88f66fd (diff)
downloadjquery-0d755dff13ae36a9b2f79ecbb0db05dd2c322e42.tar.gz
jquery-0d755dff13ae36a9b2f79ecbb0db05dd2c322e42.zip
Merge branch 'master' of https://github.com/inukshuk/jquery into inukshuk-master
Conflicts: test/unit/offset.js
Diffstat (limited to 'test/unit/offset.js')
-rw-r--r--test/unit/offset.js28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/unit/offset.js b/test/unit/offset.js
index ae0518849..198211263 100644
--- a/test/unit/offset.js
+++ b/test/unit/offset.js
@@ -433,7 +433,33 @@ test("offsetParent", function(){
equals( div[1], jQuery("#nothiddendiv")[0], "The div is the offsetParent." );
});
-function testoffset( name, fn ) {
+test("fractions (see #7730 and #7885)", function() {
+ expect(2);
+
+ jQuery('body').append('<div id="fractions"/>');
+
+ var expected = { top: 1000, left: 1000 };
+ var div = jQuery('#fractions');
+
+ div.css({
+ position: 'absolute',
+ left: '1000.7432222px',
+ top: '1000.532325px',
+ width: 100,
+ height: 100
+ });
+
+ div.offset(expected);
+
+ var result = div.offset();
+
+ equals( result.top, expected.top, "Check top" );
+ equals( result.left, expected.left, "Check left" );
+
+ div.remove();
+});
+
+function testoffset(name, fn) {
test(name, function() {
// pause execution for now