aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/position/position.html4
-rw-r--r--tests/unit/position/position_core.js18
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/unit/position/position.html b/tests/unit/position/position.html
index 5a54e44c9..ca5f2585d 100644
--- a/tests/unit/position/position.html
+++ b/tests/unit/position/position.html
@@ -43,5 +43,9 @@
<div style="position: absolute; height: 5000px; width: 5000px;"></div>
+<div id="bug-5280" style="height: 30px; width: 201px;">
+ <div style="width: 50px; height: 10px;"></div>
+</div>
+
</body>
</html>
diff --git a/tests/unit/position/position_core.js b/tests/unit/position/position_core.js
index 4d2716ced..57e02da0a 100644
--- a/tests/unit/position/position_core.js
+++ b/tests/unit/position/position_core.js
@@ -330,4 +330,22 @@ test("collision: none, with offset", function() {
}, { top: -13, left: -12 }, "left top, negative offset");
});
+//test('bug #5280: consistent results (avoid fractional values)', function() {
+// var wrapper = $('#bug-5280'),
+// elem = wrapper.children(),
+// offset1 = elem.position({
+// my: 'center',
+// at: 'center',
+// of: wrapper,
+// collision: 'none'
+// }).offset(),
+// offset2 = elem.position({
+// my: 'center',
+// at: 'center',
+// of: wrapper,
+// collision: 'none'
+// }).offset();
+// same(offset1, offset2);
+//});
+
})(jQuery);