r2851 - positionTo: changed tests to use sizes that divide into whole numbers to avoid offset cal...
Author: scott.gonzalez
Date: Mon Jun 29 19:35:41 2009
New Revision: 2851
Modified:
branches/dev/positionTo/tests/unit/positionTo/positionTo.html
branches/dev/positionTo/tests/unit/positionTo/positionTo_core.js
Log:
positionTo: changed tests to use sizes that divide into whole numbers to
avoid offset calculations with fractions.
Modified: branches/dev/positionTo/tests/unit/positionTo/positionTo.html
==============================================================================
--- branches/dev/positionTo/tests/unit/positionTo/positionTo.html (original)
+++ branches/dev/positionTo/tests/unit/positionTo/positionTo.html Mon Jun
29 19:35:41 2009
@@ -16,9 +16,9 @@
<body>
<div id="main" style="top: 0; left: 0;">
- <div id="el1" style="position: absolute; width: 3px; height: 3px;"></div>
- <div id="el2" style="position: absolute; width: 3px; height: 3px;"></div>
- <div id="parent" style="position: absolute; width: 3px; height: 3px; top:
4px; left: 4px;"></div>
+ <div id="el1" style="position: absolute; width: 6px; height: 6px;"></div>
+ <div id="el2" style="position: absolute; width: 6px; height: 6px;"></div>
+ <div id="parent" style="position: absolute; width: 6px; height: 6px; top:
4px; left: 4px;"></div>
</div>
<div style="position: absolute; top: 0px; left: 0px">
Modified: branches/dev/positionTo/tests/unit/positionTo/positionTo_core.js
==============================================================================
--- branches/dev/positionTo/tests/unit/positionTo/positionTo_core.js
(original)
+++ branches/dev/positionTo/tests/unit/positionTo/positionTo_core.js Mon
Jun 29 19:35:41 2009
@@ -20,7 +20,7 @@
});
same(result, elements);
- var expected = {top: 7, left: 4};
+ var expected = {top: 10, left: 4};
elements.each(function() {
same($(this).offset(), expected);
});
@@ -30,11 +30,11 @@
var definitions = [];
var offsets = {
left: 0,
- center: 1.5,
- right: 3,
+ center: 3,
+ right: 6,
top: 0,
- middle: 1.5,
- bottom: 3
+ middle: 3,
+ bottom: 6
};
var start = { left: 4, top: 4 };
$.each([0, 1], function(my) {