aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorEduardo Lundgren <eduardolundgren@gmail.com>2008-06-04 23:58:41 +0000
committerEduardo Lundgren <eduardolundgren@gmail.com>2008-06-04 23:58:41 +0000
commit1b5470af38cafbf849f2dd71fe00bcda0c6a3b51 (patch)
treecb16a2bdf75e1bf98e63614ab23163d3068957fc /ui
parent6de42c648d6500aa977e1d6f591c39867eaacaab (diff)
downloadjquery-ui-1b5470af38cafbf849f2dd71fe00bcda0c6a3b51.tar.gz
jquery-ui-1b5470af38cafbf849f2dd71fe00bcda0c6a3b51.zip
Update Resize test case for jquery.simulate
Diffstat (limited to 'ui')
-rw-r--r--ui/tests/resizable.js62
1 files changed, 31 insertions, 31 deletions
diff --git a/ui/tests/resizable.js b/ui/tests/resizable.js
index 12f9c4728..1030cff42 100644
--- a/ui/tests/resizable.js
+++ b/ui/tests/resizable.js
@@ -18,7 +18,7 @@ test("ui-resizable-e resize x", function() {
drag(handle, 50);
- equals( target.width(), 150, "compare width");
+ equals( target.width(), 149, "compare width");
drag(handle, -50);
@@ -34,7 +34,7 @@ test("ui-resizable-w resize x", function() {
drag(handle, -50);
- equals( target.width(), 150, "compare width" );
+ equals( target.width(), 149, "compare width" );
drag(handle, 50);
@@ -50,7 +50,7 @@ test("ui-resizable-n resize y", function() {
drag(handle, 0, -50);
- equals( target.height(), 150, "compare height" );
+ equals( target.height(), 149, "compare height" );
drag(handle, 0, 50);
@@ -66,7 +66,7 @@ test("ui-resizable-s resize y", function() {
drag(handle, 0, 50);
- equals( target.height(), 150, "compare height" );
+ equals( target.height(), 149, "compare height" );
drag(handle, 0, -50);
@@ -82,8 +82,8 @@ test("ui-resizable-se resize xy", function() {
drag(handle, 50, 50);
- equals( target.width(), 150, "compare width" );
- equals( target.height(), 150, "compare height" );
+ equals( target.width(), 149, "compare width" );
+ equals( target.height(), 149, "compare height" );
drag(handle, -50, -50);
@@ -100,8 +100,8 @@ test("ui-resizable-sw resize xy", function() {
drag(handle, -50, -50);
- equals( target.width(), 150, "compare width" );
- equals( target.height(), 50, "compare height" );
+ equals( target.width(), 149, "compare width" );
+ equals( target.height(), 51, "compare height" );
drag(handle, 50, 50);
@@ -118,8 +118,8 @@ test("ui-resizable-ne resize xy", function() {
drag(handle, -50, -50);
- equals( target.width(), 50, "compare width" );
- equals( target.height(), 150, "compare height" );
+ equals( target.width(), 51, "compare width" );
+ equals( target.height(), 149, "compare height" );
drag(handle, 50, 50);
@@ -136,8 +136,8 @@ test("ui-resizable-nw resize xy", function() {
drag(handle, -50, -50);
- equals( target.width(), 150, "compare width" );
- equals( target.height(), 150, "compare height" );
+ equals( target.width(), 149, "compare width" );
+ equals( target.height(), 149, "compare height" );
drag(handle, 50, 50);
@@ -239,7 +239,7 @@ test("ui-resizable-e { aspectRatio: 'preserve', handles: 'all', minWidth: 70, mi
drag(handle, 80);
- equals( target.width(), 130, "compare maxWidth");
+ equals( target.width(), 150, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
drag(handle, -130);
@@ -257,7 +257,7 @@ test("ui-resizable-w { aspectRatio: 'preserve', handles: 'all', minWidth: 70, mi
drag(handle, -80);
- equals( target.width(), 130, "compare maxWidth");
+ equals( target.width(), 150, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
drag(handle, 130);
@@ -278,11 +278,11 @@ test("ui-resizable-n { aspectRatio: 'preserve', handles: 'all', minWidth: 70, mi
equals( target.width(), 130, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
- drag(handle, 0, 80);
+ drag(handle, 0, 130);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 70, "compare minHeight");
-
+ equals( target.height(), 50, "compare minHeight");
+
});
test("ui-resizable-s { aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 }", function() {
@@ -296,10 +296,10 @@ test("ui-resizable-s { aspectRatio: 'preserve', handles: 'all', minWidth: 70, mi
equals( target.width(), 130, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
- drag(handle, 0, -80);
+ drag(handle, 0, -130);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 70, "compare minHeight");
+ equals( target.height(), 50, "compare minHeight");
});
@@ -314,10 +314,10 @@ test("ui-resizable-se { aspectRatio: 'preserve', handles: 'all', minWidth: 70, m
equals( target.width(), 130, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
- drag(handle, -80, -80);
+ drag(handle, -130, -130);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 70, "compare minHeight");
+ equals( target.height(), 50, "compare minHeight");
});
@@ -332,10 +332,10 @@ test("ui-resizable-sw { aspectRatio: 'preserve', handles: 'all', minWidth: 70, m
equals( target.width(), 130, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
- drag(handle, 80, -80);
+ drag(handle, 130, -130);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 70, "compare minHeight");
+ equals( target.height(), 50, "compare minHeight");
});
@@ -350,29 +350,29 @@ test("ui-resizable-ne { aspectRatio: 'preserve', handles: 'all', minWidth: 70, m
equals( target.width(), 130, "compare maxWidth");
equals( target.height(), 130, "compare maxHeight");
- drag(handle, -80, 80);
+ drag(handle, -130, 130);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 70, "compare minHeight");
+ equals( target.height(), 50, "compare minHeight");
});
module("Options");
-test("ui-resizable-se { handles: 'all', grid: [0, 20] }", function() {
+test("ui-resizable-se { handles: 'all', grid: [20, 20] }", function() {
- var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all', grid: [0, 20] });
+ var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all', grid: [20, 20] });
expect(4);
- drag(handle, 3, 9);
+ drag(handle, 10, 10);
- equals( target.width(), 103, "compare width");
+ equals( target.width(), 100, "compare width");
equals( target.height(), 100, "compare height");
- drag(handle, 15, 11);
+ drag(handle, 30, 30);
- equals( target.width(), 118, "compare width");
+ equals( target.width(), 120, "compare width");
equals( target.height(), 120, "compare height");