summaryrefslogtreecommitdiff
path: root/sc/qa/complex
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-22 10:02:49 +0200
committerNoel Grandin <noel@peralex.com>2015-01-12 08:36:17 +0200
commit09330056a01a4b5c3d16e3ffb6c1bff36099eb83 (patch)
treeefa793bee83eed4081edd52737e73216a3048b89 /sc/qa/complex
parent4bf4e3d40778051f1f886c47dd2b2bef82acf1e5 (diff)
java: simplify sleeping and waiting in tests
- remove the SHORT_WAIT test parameter, no-one is using it - inline the various independent shortWait() methods - use the util.utils.shortWait() utility method everywhere Change-Id: I93cd4a2580172a1441d2ff3d390f52b9505e2721
Diffstat (limited to 'sc/qa/complex')
-rw-r--r--sc/qa/complex/calcPreview/ViewForwarder.java36
1 files changed, 7 insertions, 29 deletions
diff --git a/sc/qa/complex/calcPreview/ViewForwarder.java b/sc/qa/complex/calcPreview/ViewForwarder.java
index 9e90c1940632..ea74e4132aa9 100644
--- a/sc/qa/complex/calcPreview/ViewForwarder.java
+++ b/sc/qa/complex/calcPreview/ViewForwarder.java
@@ -235,9 +235,7 @@ public class ViewForwarder {
return;
}
- try {
- Thread.sleep(500);
- } catch (InterruptedException ex) {}
+ util.utils.pause(500);
System.out.println("Press any key after resizing ");
try{
@@ -279,9 +277,7 @@ public class ViewForwarder {
System.out.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
System.out.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);
- try {
- Thread.sleep(500);
- } catch (InterruptedException ex) {}
+ util.utils.pause(500);
System.out.println("Press any key when the second line is on top");
try{
@@ -643,9 +639,7 @@ public class ViewForwarder {
return;
}
- try {
- Thread.sleep(500);
- } catch (InterruptedException ex) {}
+ util.utils.pause(500);
System.out.println("Press any key after resizing ");
try{
@@ -687,9 +681,7 @@ public class ViewForwarder {
System.out.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
System.out.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);
- try {
- Thread.sleep(500);
- } catch (InterruptedException ex) {}
+ util.utils.pause(500);
System.out.println("Press any key when the header is not visible.");
try{
@@ -853,11 +845,7 @@ public class ViewForwarder {
return;
}
- try {
- Thread.sleep(500) ;
- } catch (InterruptedException e) {
- System.out.println("While waiting :" + e) ;
- }
+ util.utils.pause(500);
XWindow xWindow = AccessibilityTools.getCurrentWindow(xModel);
XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow);
@@ -936,11 +924,7 @@ public class ViewForwarder {
return;
}
- try {
- Thread.sleep(500) ;
- } catch (InterruptedException e) {
- System.out.println("While waiting :" + e) ;
- }
+ util.utils.pause(500);
xSpreadsheetDoc = UnoRuntime.queryInterface(
XSpreadsheetDocument.class, xComp);
@@ -973,13 +957,7 @@ public class ViewForwarder {
return;
}
- try {
- Thread.sleep(500) ;
- } catch (InterruptedException e) {
- System.out.println("While waiting :" + e) ;
- }
-
-
+ util.utils.pause(500);
System.out.println("Press any key when a shape is on top.");
try{