aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2008-06-05 12:43:09 +0000
committerRichard Worth <rdworth@gmail.com>2008-06-05 12:43:09 +0000
commitecb6ffb42638a1d81585cdcbdd2b388c5667f829 (patch)
tree3e892bd5864735cd4d4e5ec0acadc41850c0855c /ui
parent1ddfaa0ab0a6f366f511e70e05ca88c1f204e107 (diff)
downloadjquery-ui-ecb6ffb42638a1d81585cdcbdd2b388c5667f829.tar.gz
jquery-ui-ecb6ffb42638a1d81585cdcbdd2b388c5667f829.zip
reverted [150] - tests should be not be changed to match broken results:
* 100 + 50 = 150; 100 + 50 != 149 * aspectRatio: 'preserve' should not allow 150x130 if original dimensions were 100x100
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 1030cff42..12f9c4728 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(), 149, "compare width");
+ equals( target.width(), 150, "compare width");
drag(handle, -50);
@@ -34,7 +34,7 @@ test("ui-resizable-w resize x", function() {
drag(handle, -50);
- equals( target.width(), 149, "compare width" );
+ equals( target.width(), 150, "compare width" );
drag(handle, 50);
@@ -50,7 +50,7 @@ test("ui-resizable-n resize y", function() {
drag(handle, 0, -50);
- equals( target.height(), 149, "compare height" );
+ equals( target.height(), 150, "compare height" );
drag(handle, 0, 50);
@@ -66,7 +66,7 @@ test("ui-resizable-s resize y", function() {
drag(handle, 0, 50);
- equals( target.height(), 149, "compare height" );
+ equals( target.height(), 150, "compare height" );
drag(handle, 0, -50);
@@ -82,8 +82,8 @@ test("ui-resizable-se resize xy", function() {
drag(handle, 50, 50);
- equals( target.width(), 149, "compare width" );
- equals( target.height(), 149, "compare height" );
+ equals( target.width(), 150, "compare width" );
+ equals( target.height(), 150, "compare height" );
drag(handle, -50, -50);
@@ -100,8 +100,8 @@ test("ui-resizable-sw resize xy", function() {
drag(handle, -50, -50);
- equals( target.width(), 149, "compare width" );
- equals( target.height(), 51, "compare height" );
+ equals( target.width(), 150, "compare width" );
+ equals( target.height(), 50, "compare height" );
drag(handle, 50, 50);
@@ -118,8 +118,8 @@ test("ui-resizable-ne resize xy", function() {
drag(handle, -50, -50);
- equals( target.width(), 51, "compare width" );
- equals( target.height(), 149, "compare height" );
+ equals( target.width(), 50, "compare width" );
+ equals( target.height(), 150, "compare height" );
drag(handle, 50, 50);
@@ -136,8 +136,8 @@ test("ui-resizable-nw resize xy", function() {
drag(handle, -50, -50);
- equals( target.width(), 149, "compare width" );
- equals( target.height(), 149, "compare height" );
+ equals( target.width(), 150, "compare width" );
+ equals( target.height(), 150, "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(), 150, "compare maxWidth");
+ equals( target.width(), 130, "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(), 150, "compare maxWidth");
+ equals( target.width(), 130, "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, 130);
+ drag(handle, 0, 80);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 50, "compare minHeight");
-
+ equals( target.height(), 70, "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, -130);
+ drag(handle, 0, -80);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 50, "compare minHeight");
+ equals( target.height(), 70, "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, -130, -130);
+ drag(handle, -80, -80);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 50, "compare minHeight");
+ equals( target.height(), 70, "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, 130, -130);
+ drag(handle, 80, -80);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 50, "compare minHeight");
+ equals( target.height(), 70, "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, -130, 130);
+ drag(handle, -80, 80);
equals( target.width(), 70, "compare minWidth");
- equals( target.height(), 50, "compare minHeight");
+ equals( target.height(), 70, "compare minHeight");
});
module("Options");
-test("ui-resizable-se { handles: 'all', grid: [20, 20] }", function() {
+test("ui-resizable-se { handles: 'all', grid: [0, 20] }", function() {
- var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all', grid: [20, 20] });
+ var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all', grid: [0, 20] });
expect(4);
- drag(handle, 10, 10);
+ drag(handle, 3, 9);
- equals( target.width(), 100, "compare width");
+ equals( target.width(), 103, "compare width");
equals( target.height(), 100, "compare height");
- drag(handle, 30, 30);
+ drag(handle, 15, 11);
- equals( target.width(), 120, "compare width");
+ equals( target.width(), 118, "compare width");
equals( target.height(), 120, "compare height");