diff options
author | Manolo Carrasco <manolo@apache.org> | 2010-06-11 11:22:45 +0000 |
---|---|---|
committer | Manolo Carrasco <manolo@apache.org> | 2010-06-11 11:22:45 +0000 |
commit | 072fc50425842118c1b773854e1301476b7b05e4 (patch) | |
tree | b7986c39b09fec7899096f5993666eb289f9849c | |
parent | cab2af2f44f0336bbb75a451eb8feef6bd5bbb93 (diff) | |
download | gwtquery-072fc50425842118c1b773854e1301476b7b05e4.tar.gz gwtquery-072fc50425842118c1b773854e1301476b7b05e4.zip |
fix for effects tests
-rw-r--r-- | gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryEffectsTest.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryEffectsTest.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryEffectsTest.java index d670627e..94e2bd11 100644 --- a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryEffectsTest.java +++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryEffectsTest.java @@ -116,14 +116,16 @@ public class GQueryEffectsTest extends GWTTestCase { final GQuery g = $("#idtest").css("position", "absolute"); final Offset o = g.offset(); + + final int duration = 800; g.as(Effects.Effects). - animate($$("left: '+=100'"), 400, Easing.LINEAR). - animate($$("top: '+=100'"), 400, Easing.LINEAR). - animate($$("left: '-=100'"), 400, Easing.LINEAR). - animate($$("top: '-=100'"), 400, Easing.LINEAR); + animate($$("left: '+=100'"), duration, Easing.LINEAR). + animate($$("top: '+=100'"), duration, Easing.LINEAR). + animate($$("left: '-=100'"), duration, Easing.LINEAR). + animate($$("top: '-=100'"), duration, Easing.LINEAR); // Configure the max duration for this test - delayTestFinish(400 * 4); + delayTestFinish(duration * 4); // each timer calls the next one final Timer timer1 = new Timer() { @@ -136,24 +138,24 @@ public class GQueryEffectsTest extends GWTTestCase { final Timer timer2 = new Timer() { public void run() { assertPosition(g, o.add(99, 100), o.add(1, 100)); - timer1.schedule(400); + timer1.schedule(duration); } }; final Timer timer3 = new Timer() { public void run() { assertPosition(g, o.add(100, 1), o.add(100, 99)); - timer2.schedule(400); + timer2.schedule(duration); } }; final Timer timer4 = new Timer() { public void run() { assertPosition(g, o.add(1, 0), o.add(99, 0)); - timer3.schedule(400); + timer3.schedule(duration); } }; // Starts the first timer - timer4.schedule(200); + timer4.schedule(duration/2); } private void assertPosition(GQuery g, Offset min, Offset max) { |