aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/offset.js
diff options
context:
space:
mode:
authorlouisremi <louisremi@louisremi-laptop.(none)>2011-04-12 11:29:25 +0200
committerlouisremi <louisremi@louisremi-laptop.(none)>2011-04-12 11:29:25 +0200
commita5604aedb74ec39624b21229a5c8542c793b0382 (patch)
tree9fa541ff92d96a8979af260a31f2d75492e696fd /test/unit/offset.js
parent8547b34f9265ed2d2b5380b1db5dfcaf97d96d5a (diff)
parent312df0441b16981dd697d74fcbc1e1f212b47b7e (diff)
downloadjquery-a5604aedb74ec39624b21229a5c8542c793b0382.tar.gz
jquery-a5604aedb74ec39624b21229a5c8542c793b0382.zip
merge with master and resolve more conflicts
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 a346b657c..f7bda29be 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