You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by st...@apache.org on 2013/09/29 09:20:13 UTC
svn commit: r1527279 [28/28] - in /openoffice/branches/ia2: ./
extras/l10n/source/ast/ extras/l10n/source/bg/ extras/l10n/source/cs/
extras/l10n/source/da/ extras/l10n/source/de/ extras/l10n/source/el/
extras/l10n/source/es/ extras/l10n/source/eu/ extr...
Modified: openoffice/branches/ia2/test/testcommon/source/org/openoffice/test/vcl/Tester.java
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/test/testcommon/source/org/openoffice/test/vcl/Tester.java?rev=1527279&r1=1527278&r2=1527279&view=diff
==============================================================================
--- openoffice/branches/ia2/test/testcommon/source/org/openoffice/test/vcl/Tester.java (original)
+++ openoffice/branches/ia2/test/testcommon/source/org/openoffice/test/vcl/Tester.java Sun Sep 29 07:19:52 2013
@@ -102,13 +102,23 @@ public class Tester {
robot.mousePress(InputEvent.BUTTON1_MASK);
int x = fromX;
int y = fromY;
+ // get the direction
int dx = toX > fromX ? 1 : -1;
int dy = toY > fromY ? 1 : -1;
+ // get the step sizes
+ final int stepTarget = 10;
+ int sx = (toX - fromX) / stepTarget;
+ int sy = (toY - fromY) / stepTarget;
+ if( sx == 0) sx = dx;
+ if( sy == 0) sy = dy;
while (x != toX || y != toY) {
- if (x != toX)
- x = x + dx;
- if (y != toY)
- y = y + dy;
+ x += sx;
+ y += sy;
+ // limit drag pos to target pos
+ if( ((x - toX) * dx) > 0)
+ x = toX;
+ if( ((y - toY) * dy) > 0)
+ y = toY;
robot.mouseMove(x, y);
}
robot.mouseRelease(InputEvent.BUTTON1_MASK);
Modified: openoffice/branches/ia2/test/testgui/source/fvt/gui/sd/shape/ShapeTypes.java
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/test/testgui/source/fvt/gui/sd/shape/ShapeTypes.java?rev=1527279&r1=1527278&r2=1527279&view=diff
==============================================================================
--- openoffice/branches/ia2/test/testgui/source/fvt/gui/sd/shape/ShapeTypes.java (original)
+++ openoffice/branches/ia2/test/testgui/source/fvt/gui/sd/shape/ShapeTypes.java Sun Sep 29 07:19:52 2013
@@ -60,11 +60,11 @@ public class ShapeTypes {
@After
public void tearDown() throws Exception {
- sleep(3);
//close navigator
if (sdNavigatorDlg.exists()) {
app.dispatch(".uno:Navigator");
}
+ AppTool.discard();
app.stop();
}
@@ -78,6 +78,7 @@ public class ShapeTypes {
impress.focus();
//before insert CallOut Shape
sdNavigator.focus();
+ sdNavigator.waitForEnabled( 2.0, 0.1);
sdNavigatorShapeFilter.click();
typeKeys("<down><down>");
typeKeys("<enter>");
@@ -91,6 +92,7 @@ public class ShapeTypes {
impress.focus();
impress.drag(100, 100, 200, 200);
sdNavigatorDlg.focus();
+ sdNavigator.waitForEnabled( 2.0, 0.1);
sdNavigatorShapeFilter.click();
typeKeys("<down><down>");
typeKeys("<enter>");
@@ -99,9 +101,8 @@ public class ShapeTypes {
typeKeys("<enter>");
allShapes=sdNavigator.getAllItemsText();
assertEquals(4, allShapes.length);
-
-
}
+
/**
* Insert a new Star shape
* @throws Exception
@@ -112,6 +113,7 @@ public class ShapeTypes {
impress.focus();
//before insert CallOut Shape
sdNavigator.focus();
+ sdNavigator.waitForEnabled( 2.0, 0.1);
sdNavigatorShapeFilter.click();
typeKeys("<down><down>");
typeKeys("<enter>");
@@ -125,6 +127,7 @@ public class ShapeTypes {
impress.focus();
impress.drag(100, 100, 200, 200);
sdNavigatorDlg.focus();
+ sdNavigator.waitForEnabled( 2.0, 0.1);
sdNavigatorShapeFilter.click();
typeKeys("<down><down>");
typeKeys("<enter>");
@@ -133,7 +136,6 @@ public class ShapeTypes {
typeKeys("<enter>");
allShapes=sdNavigator.getAllItemsText();
assertEquals(4, allShapes.length);
-
}
}
Modified: openoffice/branches/ia2/test/testgui/source/svt/gui/sc/BasicFuncOnCalc.java
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/test/testgui/source/svt/gui/sc/BasicFuncOnCalc.java?rev=1527279&r1=1527278&r2=1527279&view=diff
==============================================================================
--- openoffice/branches/ia2/test/testgui/source/svt/gui/sc/BasicFuncOnCalc.java (original)
+++ openoffice/branches/ia2/test/testgui/source/svt/gui/sc/BasicFuncOnCalc.java Sun Sep 29 07:19:52 2013
@@ -64,6 +64,7 @@ import static testlib.gui.UIMap.standard
import static testlib.gui.UIMap.startCenterOpenButton;
import java.util.HashMap;
+import java.util.logging.Level;
import org.junit.AfterClass;
import org.junit.Before;
@@ -496,5 +497,6 @@ public class BasicFuncOnCalc {
HashMap<String, Object> perf = aoo.getPerfData();
xmlResult.addRow("Data",testname.getMethodName(), i, (end - start),
perf.get("vsz"), perf.get("rss"), perf.get("handles"));
+ log.log( Level.INFO, "\t"+testname.getMethodName()+"["+i+"] took "+(end-start)+"ms");
}
}
Modified: openoffice/branches/ia2/test/testgui/source/svt/gui/sd/BasicFuncOnImpress.java
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/test/testgui/source/svt/gui/sd/BasicFuncOnImpress.java?rev=1527279&r1=1527278&r2=1527279&view=diff
==============================================================================
--- openoffice/branches/ia2/test/testgui/source/svt/gui/sd/BasicFuncOnImpress.java (original)
+++ openoffice/branches/ia2/test/testgui/source/svt/gui/sd/BasicFuncOnImpress.java Sun Sep 29 07:19:52 2013
@@ -34,6 +34,7 @@ import static testlib.gui.UIMap.*;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.HashMap;
+import java.util.logging.Level;
import org.junit.After;
import org.junit.AfterClass;
@@ -374,5 +375,6 @@ public class BasicFuncOnImpress {
HashMap<String, Object> perf = aoo.getPerfData();
xmlResult.addRow("Data",testname.getMethodName(), i, (end - start),
perf.get("vsz"), perf.get("rss"), perf.get("handles"));
+ log.log( Level.INFO, "\t"+testname.getMethodName()+"["+i+"] took "+(end-start)+"ms");
}
}
Modified: openoffice/branches/ia2/test/testgui/source/svt/gui/sw/BasicFuncOnWriter.java
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/test/testgui/source/svt/gui/sw/BasicFuncOnWriter.java?rev=1527279&r1=1527278&r2=1527279&view=diff
==============================================================================
--- openoffice/branches/ia2/test/testgui/source/svt/gui/sw/BasicFuncOnWriter.java (original)
+++ openoffice/branches/ia2/test/testgui/source/svt/gui/sw/BasicFuncOnWriter.java Sun Sep 29 07:19:52 2013
@@ -34,6 +34,7 @@ import static testlib.gui.UIMap.*;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.HashMap;
+import java.util.logging.Level;
import org.junit.After;
import org.junit.AfterClass;
@@ -517,6 +518,7 @@ public class BasicFuncOnWriter {
HashMap<String, Object> perf = aoo.getPerfData();
xmlResult.addRow("Data",testname.getMethodName(), i, (end - start),
perf.get("vsz"), perf.get("rss"), perf.get("handles"));
+ log.log( Level.INFO, "\t"+testname.getMethodName()+"["+i+"] took "+(end-start)+"ms");
}
}
Modified: openoffice/branches/ia2/test/testgui/source/svt/gui/sw/FileTypeAboutWriter.java
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/test/testgui/source/svt/gui/sw/FileTypeAboutWriter.java?rev=1527279&r1=1527278&r2=1527279&view=diff
==============================================================================
--- openoffice/branches/ia2/test/testgui/source/svt/gui/sw/FileTypeAboutWriter.java (original)
+++ openoffice/branches/ia2/test/testgui/source/svt/gui/sw/FileTypeAboutWriter.java Sun Sep 29 07:19:52 2013
@@ -34,6 +34,7 @@ import static testlib.gui.UIMap.*;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.HashMap;
+import java.util.logging.Level;
import org.junit.After;
import org.junit.AfterClass;
@@ -125,8 +126,9 @@ public class FileTypeAboutWriter {
swInsertLineButtonOnToolbar.click();
writer.focus();
for(int j=0;j<10;j++){
- writer.drag(150+j, 150+j*10, 200+j, 200+j*10);
- sleep(2);
+ // due to snap-to-grid the lines below will not all be parallel!
+ writer.drag( 150+j, 150+j*10, 200+j, 200+j*10);
+ sleep( 0.5);
}
typeKeys("<esc>");
sleep(2);
@@ -184,6 +186,7 @@ public class FileTypeAboutWriter {
HashMap<String, Object> perf = aoo.getPerfData();
xmlResult.addRow("Data",testname.getMethodName(), i, (end - start),
perf.get("vsz"), perf.get("rss"), perf.get("handles"));
+ log.log( Level.INFO, "\t"+testname.getMethodName()+"["+i+"] took "+(end-start)+"ms");
}