aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/selectable/selectable_core.js
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2009-02-04 04:53:09 +0000
committerRichard Worth <rdworth@gmail.com>2009-02-04 04:53:09 +0000
commit53f57ffdb52474db9a011a0bc38ee7943a02d177 (patch)
treefb006d16050c9a033b2e5aa4537fd18c539e3246 /tests/unit/selectable/selectable_core.js
parent96b1534483a7f5557e0c6cc795ae90faed44c22d (diff)
downloadjquery-ui-53f57ffdb52474db9a011a0bc38ee7943a02d177.tar.gz
jquery-ui-53f57ffdb52474db9a011a0bc38ee7943a02d177.zip
selectable unit tests: split tests into individual files
Diffstat (limited to 'tests/unit/selectable/selectable_core.js')
-rw-r--r--tests/unit/selectable/selectable_core.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/unit/selectable/selectable_core.js b/tests/unit/selectable/selectable_core.js
index e4ccb9efd..d7f716e5d 100644
--- a/tests/unit/selectable/selectable_core.js
+++ b/tests/unit/selectable/selectable_core.js
@@ -1,6 +1,23 @@
/*
* selectable_core.js
*/
+
+var el;
+
+var drag = function(dx, dy) {
+ var off = el.offset(), pos = { clientX: off.left, clientY: off.top };
+ el.simulate("mousedown", pos);
+ $(document).simulate("mousemove", pos);
+ pos.clientX += dx;
+ pos.clientY += dy;
+ $(document).simulate("mousemove", pos);
+ $(document).simulate("mouseup", pos);
+}
+
+var border = function(el, side) { return parseInt(el.css('border-' + side + '-width')); }
+
+var margin = function(el, side) { return parseInt(el.css('margin-' + side)); }
+
(function($) {
module("selectable: core");