From 09330056a01a4b5c3d16e3ffb6c1bff36099eb83 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 22 Dec 2014 10:02:49 +0200 Subject: 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 --- .../tests/java/mod/_basctl/AccessibleShape.java | 4 ++-- .../mod/_dbaccess/ConnectionLineAccessibility.java | 22 +++----------------- .../java/mod/_dbaccess/JoinViewAccessibility.java | 16 ++------------- .../java/mod/_dbaccess/ODatasourceBrowser.java | 16 ++------------- .../tests/java/mod/_dbaccess/OQueryDesign.java | 14 +------------ .../mod/_dbaccess/TableWindowAccessibility.java | 17 ++------------- qadevOOo/tests/java/mod/_forms/OTimeControl.java | 14 +------------ qadevOOo/tests/java/mod/_fwk/DispatchRecorder.java | 6 +----- qadevOOo/tests/java/mod/_fwk/JobExecutor.java | 4 +--- .../tests/java/mod/_remotebridge/uno/various.java | 11 ++-------- qadevOOo/tests/java/mod/_remotebridge/various.java | 11 ++-------- .../AccessibleEditableTextPara_HeaderFooter.java | 6 +++--- .../tests/java/mod/_sc/ScAccessibleCsvCell.java | 16 ++------------- .../tests/java/mod/_sc/ScAccessibleCsvGrid.java | 16 ++------------- .../tests/java/mod/_sc/ScAccessibleCsvRuler.java | 16 ++------------- .../tests/java/mod/_sc/ScAccessibleDocument.java | 14 +------------ .../mod/_sc/ScAccessibleDocumentPagePreview.java | 8 ++------ .../java/mod/_sc/ScAccessiblePageHeaderArea.java | 4 +--- qadevOOo/tests/java/mod/_sc/ScTabViewObj.java | 4 +--- qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java | 6 +----- .../tests/java/mod/_sd/AccessibleOutlineView.java | 12 ++--------- .../tests/java/mod/_sd/AccessibleSlideView.java | 14 +++---------- .../java/mod/_sd/DrawController_DrawView.java | 16 ++++----------- .../java/mod/_sd/DrawController_HandoutView.java | 18 +++++----------- .../java/mod/_sd/DrawController_NotesView.java | 18 +++++----------- .../java/mod/_sd/DrawController_OutlineView.java | 18 +++++----------- .../mod/_sd/DrawController_PresentationView.java | 18 +++++----------- qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java | 14 +++---------- qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java | 12 ++--------- qadevOOo/tests/java/mod/_sd/SdUnoPresView.java | 10 +-------- qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java | 12 ++--------- qadevOOo/tests/java/mod/_sm/SmEditAccessible.java | 16 ++------------- .../tests/java/mod/_sm/SmGraphicAccessible.java | 16 ++------------- .../java/mod/_svtools/AccessibleBrowseBox.java | 18 +++------------- .../mod/_svtools/AccessibleBrowseBoxHeaderBar.java | 20 ++++-------------- .../_svtools/AccessibleBrowseBoxHeaderCell.java | 16 ++------------- .../mod/_svtools/AccessibleBrowseBoxTable.java | 16 ++------------- .../mod/_svtools/AccessibleBrowseBoxTableCell.java | 18 +++------------- .../mod/_svtools/AccessibleIconChoiceCtrl.java | 18 +++------------- .../_svtools/AccessibleIconChoiceCtrlEntry.java | 18 +++------------- .../tests/java/mod/_svtools/AccessibleTabBar.java | 16 ++------------- .../java/mod/_svtools/AccessibleTabBarPage.java | 16 ++------------- .../mod/_svtools/AccessibleTabBarPageList.java | 16 ++------------- .../java/mod/_svtools/AccessibleTreeListBox.java | 16 ++------------- .../mod/_svtools/AccessibleTreeListBoxEntry.java | 18 +++------------- .../java/mod/_svx/AccessibleControlShape.java | 2 +- .../java/mod/_svx/AccessibleEditableTextPara.java | 14 +------------ .../mod/_svx/SvxGraphCtrlAccessibleContext.java | 2 +- .../java/mod/_sw/SwAccessibleDocumentPageView.java | 17 ++------------- .../tests/java/mod/_sw/SwAccessiblePageView.java | 16 ++------------- .../tests/java/mod/_toolkit/AccessibleButton.java | 6 +++--- .../java/mod/_toolkit/AccessibleCheckBox.java | 8 ++++---- .../java/mod/_toolkit/AccessibleComboBox.java | 4 ++-- .../mod/_toolkit/AccessibleDropDownListBox.java | 14 +------------ .../tests/java/mod/_toolkit/AccessibleEdit.java | 14 +------------ .../java/mod/_toolkit/AccessibleFixedText.java | 14 +------------ .../tests/java/mod/_toolkit/AccessibleList.java | 18 +++------------- .../tests/java/mod/_toolkit/AccessibleListBox.java | 18 +++------------- .../java/mod/_toolkit/AccessibleListItem.java | 18 +++------------- .../tests/java/mod/_toolkit/AccessibleMenu.java | 19 ++--------------- .../tests/java/mod/_toolkit/AccessibleMenuBar.java | 14 +------------ .../java/mod/_toolkit/AccessibleMenuItem.java | 16 ++------------- .../java/mod/_toolkit/AccessibleMenuSeparator.java | 16 ++------------- .../java/mod/_toolkit/AccessiblePopupMenu.java | 8 ++------ .../java/mod/_toolkit/AccessibleRadioButton.java | 6 +++--- .../java/mod/_toolkit/AccessibleTabControl.java | 18 +++------------- .../tests/java/mod/_toolkit/AccessibleTabPage.java | 24 ++++++---------------- 67 files changed, 155 insertions(+), 756 deletions(-) (limited to 'qadevOOo/tests/java/mod') diff --git a/qadevOOo/tests/java/mod/_basctl/AccessibleShape.java b/qadevOOo/tests/java/mod/_basctl/AccessibleShape.java index 5f2d45fbb3a1..daac55ca402f 100644 --- a/qadevOOo/tests/java/mod/_basctl/AccessibleShape.java +++ b/qadevOOo/tests/java/mod/_basctl/AccessibleShape.java @@ -95,7 +95,7 @@ public class AccessibleShape extends TestCase { throw new StatusException("Couldn't open Basic Dialog",e); } - utils.shortWait(3000); + utils.pause(3000); try { oObj = (XInterface) tParam.getMSF().createInstance @@ -132,7 +132,7 @@ public class AccessibleShape extends TestCase { newPosSize.Y = oldPosSize.Y + 20; basicIDE.setPosSize(newPosSize.X, newPosSize.Y, newPosSize.Width, newPosSize.Height, PosSize.POSSIZE); - utils.shortWait(1000); + utils.pause(1000); basicIDE.setPosSize(oldPosSize.X, oldPosSize.Y, oldPosSize.Width, oldPosSize.Height, PosSize.POSSIZE); } diff --git a/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java b/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java index 1b81aa16ebf5..bfffdfd7ce3c 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java +++ b/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java @@ -217,7 +217,7 @@ public class ConnectionLineAccessibility extends TestCase { try { - shortWait(); + util.utils.pause(1500); connection = isolConnection.getIsolatedConnection(user, password); statement = connection.createStatement(); @@ -318,7 +318,7 @@ public class ConnectionLineAccessibility extends TestCase QueryComponent = DesktopTools.loadDoc(Param.getMSF(),".component:DB/QueryDesign",loadProps); - util.utils.shortWait(1000); + util.utils.pause(1000); xWindow = UnoRuntime.queryInterface(XModel.class, QueryComponent). getCurrentController().getFrame().getContainerWindow(); @@ -335,7 +335,7 @@ public class ConnectionLineAccessibility extends TestCase TestEnvironment tEnv = new TestEnvironment(oObj); - shortWait(); + util.utils.pause(1500); final XWindow queryWin = xWindow; @@ -376,20 +376,4 @@ public class ConnectionLineAccessibility extends TestCase e.printStackTrace(); } } - - /** - * Sleeps for 1.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() - { - try - { - Thread.sleep(1500); - } - catch (InterruptedException e) - { - log.println("While waiting :" + e); - } - } } diff --git a/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java b/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java index 46a5551c68a1..4d944239d6e0 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java +++ b/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java @@ -204,7 +204,7 @@ public class JoinViewAccessibility extends TestCase { { try { - shortWait (); + util.utils.pause(1500); connection = isolConnection.getIsolatedConnection (user, password); statement = connection.createStatement (); @@ -306,7 +306,7 @@ public class JoinViewAccessibility extends TestCase { TestEnvironment tEnv = new TestEnvironment(oObj); - shortWait(); + util.utils.pause(1500); final XWindow queryWin = xWindow; @@ -343,16 +343,4 @@ public class JoinViewAccessibility extends TestCase { e.printStackTrace (); } } - - /** - * Sleeps for 1.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(1500); - } catch (InterruptedException e) { - log.println("While waiting :" + e); - } - } } diff --git a/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java b/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java index 128995024f04..3fb3287d95cf 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java +++ b/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java @@ -204,7 +204,7 @@ public class ODatasourceBrowser extends TestCase { throw new StatusException("Couldn't create document", e); } - shortWait(); + util.utils.pause(5000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -263,7 +263,7 @@ public class ODatasourceBrowser extends TestCase { throw new StatusException("Couldn't initialize document", e); } - shortWait(); + util.utils.pause(5000); XControlShape aShape = FormTools.createControlShape(xTextDoc, 3000, 4500, 15000, 10000, @@ -309,16 +309,4 @@ public class ODatasourceBrowser extends TestCase { return tEnv; } // finish method getTestEnvironment - - /** - * Sleeps for 0.2 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e); - } - } } // finish class oDatasourceBrowser diff --git a/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java b/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java index d3cfde832908..255b7f9d1668 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java +++ b/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java @@ -136,7 +136,7 @@ public class OQueryDesign extends TestCase { Args[1] = param2; getting.dispatch(the_url,Args); - shortWait(); + util.utils.pause(5000); Object oDBC = null; @@ -289,17 +289,5 @@ public class OQueryDesign extends TestCase { } - /** - * Sleeps for 0.2 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } // finish class oDatasourceBrowser diff --git a/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java b/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java index aaa4303b2a90..b7c5513b2145 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java +++ b/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java @@ -190,7 +190,7 @@ public class TableWindowAccessibility extends TestCase { col_name2 + " int)"); } catch (com.sun.star.sdbc.SQLException e) { try { - shortWait(); + util.utils.pause(1500); connection = isolConnection.getIsolatedConnection(user, password); statement = connection.createStatement(); @@ -281,7 +281,7 @@ public class TableWindowAccessibility extends TestCase { TestEnvironment tEnv = new TestEnvironment(oObj); - shortWait(); + util.utils.pause(1500); XAccessibleComponent accComp = UnoRuntime.queryInterface( XAccessibleComponent.class, @@ -330,17 +330,4 @@ public class TableWindowAccessibility extends TestCase { e.printStackTrace (); } } - - - /** - * Sleeps for 1.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(1500); - } catch (InterruptedException e) { - log.println("While waiting :" + e); - } - } } diff --git a/qadevOOo/tests/java/mod/_forms/OTimeControl.java b/qadevOOo/tests/java/mod/_forms/OTimeControl.java index 67703e5a7439..f2748b3e535c 100644 --- a/qadevOOo/tests/java/mod/_forms/OTimeControl.java +++ b/qadevOOo/tests/java/mod/_forms/OTimeControl.java @@ -231,20 +231,8 @@ public class OTimeControl extends TestCase { tEnv.addObjRelation("TestTextListener", listener); FormTools.switchDesignOf((Param.getMSF()), xTextDoc); - shortWait(); + util.utils.pause(200); return tEnv; } // finish method getTestEnvironment - - /** - * Sleeps for 0.2 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(200); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e); - } - } } // finish class OTimeControl diff --git a/qadevOOo/tests/java/mod/_fwk/DispatchRecorder.java b/qadevOOo/tests/java/mod/_fwk/DispatchRecorder.java index 0149effc9bde..d155c4c66525 100644 --- a/qadevOOo/tests/java/mod/_fwk/DispatchRecorder.java +++ b/qadevOOo/tests/java/mod/_fwk/DispatchRecorder.java @@ -76,11 +76,7 @@ public class DispatchRecorder extends TestCase { try { SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF()); oDoc = SOF.createTextDoc(null); - try { - Thread.sleep(1000); - } - catch (InterruptedException ex) { - } + util.utils.pause(1000); XModel model = UnoRuntime.queryInterface(XModel.class, oDoc); xFrame = model.getCurrentController().getFrame(); diff --git a/qadevOOo/tests/java/mod/_fwk/JobExecutor.java b/qadevOOo/tests/java/mod/_fwk/JobExecutor.java index 8816fe136ea6..7d518d924cbc 100644 --- a/qadevOOo/tests/java/mod/_fwk/JobExecutor.java +++ b/qadevOOo/tests/java/mod/_fwk/JobExecutor.java @@ -180,9 +180,7 @@ public class JobExecutor extends TestCase { XChangesBatch xCB = UnoRuntime.queryInterface(XChangesBatch.class, oRootCfg); xCB.commitChanges(); - try { - Thread.sleep(1000); - } catch (InterruptedException ex) {} + util.utils.pause(1000); } catch (com.sun.star.uno.Exception e) { e.printStackTrace(log); diff --git a/qadevOOo/tests/java/mod/_remotebridge/uno/various.java b/qadevOOo/tests/java/mod/_remotebridge/uno/various.java index 378a89d74c93..c62bf1ee13c8 100644 --- a/qadevOOo/tests/java/mod/_remotebridge/uno/various.java +++ b/qadevOOo/tests/java/mod/_remotebridge/uno/various.java @@ -214,10 +214,7 @@ public class various extends TestCase { accThread = new AcceptorThread(xAcctr, xInstProv, xBrdgFctr); accThread.start(); // let the thread sleep - try { - Thread.sleep(500); - } - catch (InterruptedException e) {} + util.utils.pause(500); // establish the connection XConnection xConnection = xCntr.connect(connectString); @@ -279,11 +276,7 @@ public class various extends TestCase { bridgeDisposed[0] = true; xComp.dispose(); // wait for dispose - try { - Thread.sleep(5000); - } - catch(InterruptedException e) { - } + util.utils.pause(5000); } } } diff --git a/qadevOOo/tests/java/mod/_remotebridge/various.java b/qadevOOo/tests/java/mod/_remotebridge/various.java index 0cd56a506f12..be245feebf5e 100644 --- a/qadevOOo/tests/java/mod/_remotebridge/various.java +++ b/qadevOOo/tests/java/mod/_remotebridge/various.java @@ -203,10 +203,7 @@ public class various extends TestCase { accThread = new AcceptorThread(xAcctr); accThread.start(); // let the thread sleep - try { - Thread.sleep(500); - } - catch (InterruptedException e) {} + util.utils.pause(500); // establish the connection XConnection xConnection = xCntr.connect(connectString); @@ -268,11 +265,7 @@ public class various extends TestCase { bridgeDisposed[0] = true; xComp.dispose(); // wait for dispose - try { - Thread.sleep(5000); - } - catch(InterruptedException e) { - } + util.utils.pause(5000); } } } diff --git a/qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_HeaderFooter.java b/qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_HeaderFooter.java index 01a80ea65460..111b20c246b4 100644 --- a/qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_HeaderFooter.java +++ b/qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_HeaderFooter.java @@ -68,12 +68,12 @@ public class AccessibleEditableTextPara_HeaderFooter extends TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, toolkit); - util.utils.shortWait(Param.getInt("ShortWait")); + util.utils.pause(Param.getInt("ShortWait")); DiagThread psDiag = new DiagThread(xCalcDoc, msf); psDiag.start(); - util.utils.shortWait(Param.getInt("ShortWait")*5); + util.utils.pause(Param.getInt("ShortWait")*5); Object atw = tk.getActiveTopWindow(); @@ -82,7 +82,7 @@ public class AccessibleEditableTextPara_HeaderFooter extends TestCase { XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow); - util.utils.shortWait(Param.getInt("ShortWait")); + util.utils.pause(Param.getInt("ShortWait")); AccessibilityTools.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE)); XAccessibleContext ok_button = AccessibilityTools.getAccessibleObjectForRole(xRoot, diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvCell.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvCell.java index a7e8de208e80..02608fcbdc44 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvCell.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvCell.java @@ -59,7 +59,7 @@ public class ScAccessibleCsvCell extends TestCase { protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { XInterface oObj = null; - shortWait(); + util.utils.pause(2000); try { oObj = (XInterface) tParam.getMSF().createInstance @@ -152,19 +152,7 @@ public class ScAccessibleCsvCell extends TestCase { lThread = new loadThread(SOF, args); lThread.start(); - shortWait(); - } - - /** - * Sleeps for 2 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(2000) ; - } catch (InterruptedException e) { - log.println("While waiting :" + e) ; - } + util.utils.pause(2000); } private class loadThread extends Thread { diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java index bc440dc04f90..8fa3f4c458f8 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java @@ -59,7 +59,7 @@ public class ScAccessibleCsvGrid extends TestCase { XInterface oObj = null; - shortWait(); + util.utils.pause(2000); try { oObj = (XInterface) Param.getMSF().createInstance @@ -137,22 +137,10 @@ public class ScAccessibleCsvGrid extends TestCase { lThread = new loadThread(SOF, args); lThread.start(); - shortWait(); + util.utils.pause(2000); } - /** - * Sleeps for 2 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(2000) ; - } catch (InterruptedException e) { - log.println("While waiting :" + e) ; - } - } - private class loadThread extends Thread { private final SOfficeFactory SOF; diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java index 73cd68f0f484..d41103abad15 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java @@ -62,7 +62,7 @@ public class ScAccessibleCsvRuler extends TestCase { PrintWriter log) { XInterface oObj = null; - shortWait(); + util.utils.pause(2000); XMultiServiceFactory msf = Param.getMSF(); @@ -172,22 +172,10 @@ public class ScAccessibleCsvRuler extends TestCase { lThread = new loadThread(SOF, args); lThread.start(); - shortWait(); + util.utils.pause(2000); } - /** - * Sleeps for 2 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(2000) ; - } catch (InterruptedException e) { - log.println("While waiting :" + e) ; - } - } - private class loadThread extends Thread { private final SOfficeFactory SOF; diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleDocument.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleDocument.java index de651d08862f..ea3745995342 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessibleDocument.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleDocument.java @@ -139,23 +139,11 @@ public class ScAccessibleDocument extends TestCase { String url = utils.getFullTestURL("calcshapes.sxc"); log.println("loading document "+url); xSpreadsheetDoc = SOF.loadDocument(url); - shortWait(); + util.utils.pause(500); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException( "Couldn't create document ", e ); } } - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(500) ; - } catch (InterruptedException e) { - log.println("While waiting :" + e) ; - } - } - } diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java index 17bcc092f8f7..3cdcce98765f 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java @@ -149,9 +149,7 @@ public class ScAccessibleDocumentPagePreview extends TestCase { throw new StatusException(e, Status.failed("Couldn't change mode")); } - try { - Thread.sleep(500); - } catch (InterruptedException ex) {} + util.utils.shortWait(); XWindow xWindow = AccessibilityTools.getCurrentContainerWindow(aModel); XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow); @@ -215,9 +213,7 @@ public class ScAccessibleDocumentPagePreview extends TestCase { log.println("loading document "+url); xSpreadsheetDoc = UnoRuntime.queryInterface( XSpreadsheetDocument.class,SOF.loadDocument(url)); - try { - Thread.sleep(500); - } catch (InterruptedException ex) {} + util.utils.pause(500); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException( "Couldn't create document ", e ); diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java b/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java index b6eb255012c0..2118c7ad1d78 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java @@ -131,9 +131,7 @@ public class ScAccessiblePageHeaderArea extends TestCase { throw new StatusException(e, Status.failed("Couldn't change mode")); } - try { - Thread.sleep(500); - } catch (InterruptedException ex) {} + util.utils.pause(500); XWindow xWindow = AccessibilityTools.getCurrentContainerWindow(aModel); XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow); diff --git a/qadevOOo/tests/java/mod/_sc/ScTabViewObj.java b/qadevOOo/tests/java/mod/_sc/ScTabViewObj.java index 782fdd9c3df2..0321f951f6ed 100644 --- a/qadevOOo/tests/java/mod/_sc/ScTabViewObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScTabViewObj.java @@ -98,9 +98,7 @@ public class ScTabViewObj extends TestCase { try { log.println("creating two spreadsheet documents"); xSpreadsheetDoc = SOF.createCalcDoc(null); - try { - Thread.sleep(1000); - } catch (InterruptedException e) {} + util.utils.pause(1000); xSpreadsheetDoc2 = SOF.createCalcDoc(null); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); diff --git a/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java b/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java index 84846d0ddaf3..f6aba03574b6 100644 --- a/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java @@ -160,11 +160,7 @@ public class ScTableSheetObj extends TestCase { log.println("Couldn't get XCloseable"); } - try { - log.println("Sleeping 500 Millis"); - Thread.sleep(500); - } catch (InterruptedException ex) { - } + util.utils.pause(500); log.println("... Done"); } diff --git a/qadevOOo/tests/java/mod/_sd/AccessibleOutlineView.java b/qadevOOo/tests/java/mod/_sd/AccessibleOutlineView.java index 6d2bfebdcda9..886834a93238 100644 --- a/qadevOOo/tests/java/mod/_sd/AccessibleOutlineView.java +++ b/qadevOOo/tests/java/mod/_sd/AccessibleOutlineView.java @@ -123,7 +123,7 @@ public class AccessibleOutlineView extends TestCase { try { log.println( "creating a impress document" ); xImpressDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(2000); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException("Couldn't create document", e); @@ -152,15 +152,7 @@ public class AccessibleOutlineView extends TestCase { } catch (com.sun.star.uno.Exception e) { log.println("Couldn't change mode"); } - shortWait(); - } - - private void shortWait() { - try { - Thread.sleep(2000) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } + util.utils.pause(2000); } } diff --git a/qadevOOo/tests/java/mod/_sd/AccessibleSlideView.java b/qadevOOo/tests/java/mod/_sd/AccessibleSlideView.java index 042f6b13fcbe..ccdd916cf13c 100644 --- a/qadevOOo/tests/java/mod/_sd/AccessibleSlideView.java +++ b/qadevOOo/tests/java/mod/_sd/AccessibleSlideView.java @@ -69,7 +69,7 @@ public class AccessibleSlideView extends TestCase { oDPn.insertNewByIndex(0); - shortWait(); + util.utils.pause(2000); XWindow xWindow = AccessibilityTools.getCurrentWindow ( aModel); @@ -135,7 +135,7 @@ public class AccessibleSlideView extends TestCase { throw new StatusException("Couldn't create document", e); } - shortWait(); + util.utils.pause(2000); aModel = UnoRuntime.queryInterface(XModel.class, xImpressDoc); @@ -160,16 +160,8 @@ public class AccessibleSlideView extends TestCase { log.println("Couldn't change mode"); } - shortWait(); + util.utils.pause(2000); } - - private void shortWait() { - try { - Thread.sleep(2000) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } } diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java b/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java index ed00ca1445cd..fc5962395a51 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java @@ -139,9 +139,9 @@ public class DrawController_DrawView extends TestCase { try { log.println( "creating two impress documents" ); xDrawDoc = SOF.createDrawDoc(null); - shortWait(); + util.utils.pause(1000); xSecondDrawDoc = SOF.createDrawDoc(null); - shortWait(); + util.utils.pause(1000); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException("Couldn't create document", e); @@ -180,7 +180,7 @@ public class DrawController_DrawView extends TestCase { oShapes.add(shape1); oShapes.add(shape2); oShapes.add(shape3); - shortWait(); + util.utils.pause(1000); XModel aModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc); @@ -215,7 +215,7 @@ public class DrawController_DrawView extends TestCase { xShapes1.add(shape2); xShapes1.add(shape3); xShapes2.add(shape1); - shortWait(); + util.utils.pause(1000); tEnv.addObjRelation("Selections", new Object[] { @@ -266,14 +266,6 @@ public class DrawController_DrawView extends TestCase { } // finish method getTestEnvironment - private void shortWait() { - try { - Thread.sleep(1000) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java b/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java index 9c7462098a9d..68cf6a1e8886 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java @@ -157,9 +157,9 @@ public class DrawController_HandoutView extends TestCase { try { log.println( "creating two impress documents" ); xSecondDrawDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(1000); xDrawDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(1000); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException("Couldn't create document", e); @@ -201,7 +201,7 @@ public class DrawController_HandoutView extends TestCase { oShapes.add(shape1); oShapes.add(shape2); oShapes.add(shape3); - shortWait(); + util.utils.pause(1000); log.println("switch to HandoutView..."); try{ @@ -211,7 +211,7 @@ public class DrawController_HandoutView extends TestCase { throw new StatusException(e, Status.failed(e.getMessage())); } - utils.shortWait(500); + utils.pause(500); XModel aModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc); @@ -248,7 +248,7 @@ public class DrawController_HandoutView extends TestCase { xShapes1.add(shape2); xShapes1.add(shape3); xShapes2.add(shape1); - shortWait(); + util.utils.pause(1000); tEnv.addObjRelation("Selections", new Object[] { oDrawPage, oShapeCol1, oShapeCol2}); @@ -301,14 +301,6 @@ public class DrawController_HandoutView extends TestCase { } // finish method getTestEnvironment - private void shortWait() { - try { - Thread.sleep(1000) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java b/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java index a16b052ea4ae..b1abd6070b67 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java @@ -157,9 +157,9 @@ public class DrawController_NotesView extends TestCase { try { log.println( "creating two impress documents" ); xSecondDrawDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(1000); xDrawDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(1000); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException("Couldn't create document", e); @@ -198,7 +198,7 @@ public class DrawController_NotesView extends TestCase { oShapes.add(shape1); oShapes.add(shape2); oShapes.add(shape3); - shortWait(); + util.utils.pause(1000); log.println("switch to HandoutView..."); try{ @@ -208,7 +208,7 @@ public class DrawController_NotesView extends TestCase { throw new StatusException(e, Status.failed(e.getMessage())); } - utils.shortWait(500); + utils.pause(500); XModel aModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc); @@ -245,7 +245,7 @@ public class DrawController_NotesView extends TestCase { xShapes1.add(shape2); xShapes1.add(shape3); xShapes2.add(shape1); - shortWait(); + util.utils.pause(1000); tEnv.addObjRelation("Selections", new Object[] { oDrawPage, oShapeCol1, oShapeCol2}); @@ -298,14 +298,6 @@ public class DrawController_NotesView extends TestCase { } // finish method getTestEnvironment - private void shortWait() { - try { - Thread.sleep(1000) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java b/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java index 8a6d21e72a14..406c04bc0fed 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java @@ -157,9 +157,9 @@ public class DrawController_OutlineView extends TestCase { try { log.println( "creating two impress documents" ); xSecondDrawDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(1000); xDrawDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(1000); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException("Couldn't create document", e); @@ -198,7 +198,7 @@ public class DrawController_OutlineView extends TestCase { oShapes.add(shape1); oShapes.add(shape2); oShapes.add(shape3); - shortWait(); + util.utils.pause(1000); log.println("switch to HandoutView..."); try{ @@ -208,7 +208,7 @@ public class DrawController_OutlineView extends TestCase { throw new StatusException(e, Status.failed(e.getMessage())); } - utils.shortWait(500); + utils.pause(500); XModel aModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc); @@ -245,7 +245,7 @@ public class DrawController_OutlineView extends TestCase { xShapes1.add(shape2); xShapes1.add(shape3); xShapes2.add(shape1); - shortWait(); + util.utils.pause(1000); tEnv.addObjRelation("Selections", new Object[] { oDrawPage, oShapeCol1, oShapeCol2}); @@ -298,14 +298,6 @@ public class DrawController_OutlineView extends TestCase { } // finish method getTestEnvironment - private void shortWait() { - try { - Thread.sleep(1000) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java b/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java index cd59131d9670..e1a6c2b883a7 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java @@ -157,9 +157,9 @@ public class DrawController_PresentationView extends TestCase { try { log.println( "creating two impress documents" ); xSecondDrawDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(1000); xDrawDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(1000); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException("Couldn't create document", e); @@ -198,7 +198,7 @@ public class DrawController_PresentationView extends TestCase { oShapes.add(shape1); oShapes.add(shape2); oShapes.add(shape3); - shortWait(); + util.utils.pause(1000); log.println("switch to PresentationView..."); try{ @@ -208,7 +208,7 @@ public class DrawController_PresentationView extends TestCase { throw new StatusException(e, Status.failed(e.getMessage())); } - utils.shortWait(500); + utils.pause(500); XModel aModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc); @@ -245,7 +245,7 @@ public class DrawController_PresentationView extends TestCase { xShapes1.add(shape2); xShapes1.add(shape3); xShapes2.add(shape1); - shortWait(); + util.utils.pause(1000); tEnv.addObjRelation("Selections", new Object[] { oDrawPage, oShapeCol1, oShapeCol2}); @@ -298,14 +298,6 @@ public class DrawController_PresentationView extends TestCase { } // finish method getTestEnvironment - private void shortWait() { - try { - Thread.sleep(1000) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java b/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java index 8a12b9a49534..7c12d3a1d75a 100644 --- a/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java +++ b/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java @@ -153,9 +153,9 @@ public class SdUnoDrawView extends TestCase { try { log.println( "creating two draw documents" ); xDrawDoc = SOF.createDrawDoc(null); - shortWait(); + util.utils.pause(1000); xSecondDrawDoc = SOF.createDrawDoc(null); - shortWait(); + util.utils.pause(1000); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException("Couldn't create document", e); @@ -194,7 +194,7 @@ public class SdUnoDrawView extends TestCase { oShapes.add(shape1); oShapes.add(shape2); oShapes.add(shape3); - shortWait(); + util.utils.pause(1000); XModel aModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc); @@ -264,14 +264,6 @@ public class SdUnoDrawView extends TestCase { } // finish method getTestEnvironment - private void shortWait() { - try { - Thread.sleep(1000) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } // finish class SdUnoDrawView diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java b/qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java index 898af44eee57..252863b168d0 100644 --- a/qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java +++ b/qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java @@ -137,7 +137,7 @@ public class SdUnoOutlineView extends TestCase { try { log.println( "creating a impress document" ); xImpressDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(5000); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException("Couldn't create document", e); @@ -173,7 +173,7 @@ public class SdUnoOutlineView extends TestCase { try { log.println( "creating a second impress document" ); xSecondDrawDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(5000); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException("Couldn't create document", e); @@ -217,14 +217,6 @@ public class SdUnoOutlineView extends TestCase { } // finish method getTestEnvironment - private void shortWait() { - try { - Thread.sleep(5000) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } // finish class SdUnoOutlineView diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java b/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java index d6dd310dabf8..788a17630611 100644 --- a/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java +++ b/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java @@ -152,7 +152,7 @@ public class SdUnoPresView extends TestCase { log.println( "creating two impress documents" ); xImpressDoc = SOF.createImpressDoc(null); xSecondDrawDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(5000); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException("Couldn't create document", e); @@ -263,14 +263,6 @@ public class SdUnoPresView extends TestCase { } // finish method getTestEnvironment - private void shortWait() { - try { - Thread.sleep(5000) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } // finish class SdUnoDrawView diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java b/qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java index ac3cb35b3eb6..49d6abb33c2d 100644 --- a/qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java +++ b/qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java @@ -109,7 +109,7 @@ public class SdUnoSlideView extends TestCase { try { log.println( "creating a impress document" ); xImpressDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(1000); xDP = DrawTools.getDrawPages(xImpressDoc); xDP.insertNewByIndex(0); xDP.insertNewByIndex(0); @@ -144,7 +144,7 @@ public class SdUnoSlideView extends TestCase { try { log.println( "creating a second impress document" ); xSecondDrawDoc = SOF.createImpressDoc(null); - shortWait(); + util.utils.pause(1000); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException("Couldn't create document", e); @@ -196,14 +196,6 @@ public class SdUnoSlideView extends TestCase { } // finish method getTestEnvironment - private void shortWait() { - try { - Thread.sleep(1000) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } // finish class SdUnoOutlineView diff --git a/qadevOOo/tests/java/mod/_sm/SmEditAccessible.java b/qadevOOo/tests/java/mod/_sm/SmEditAccessible.java index 450736072416..68ad155820d8 100644 --- a/qadevOOo/tests/java/mod/_sm/SmEditAccessible.java +++ b/qadevOOo/tests/java/mod/_sm/SmEditAccessible.java @@ -127,10 +127,10 @@ public class SmEditAccessible extends TestCase { try { System.out.println("Children "+con.getAccessibleChildCount()); xPS.setPropertyValue("Formula", "sum hat x \n int a \n sum b"); - shortWait(); + util.utils.pause(1000); System.out.println("Children "+con.getAccessibleChildCount()); xPS.setPropertyValue("Formula", expFormula); - shortWait(); + util.utils.pause(1000); } catch(com.sun.star.lang.WrappedTargetException e) { } catch(com.sun.star.lang.IllegalArgumentException e) { } catch(com.sun.star.beans.PropertyVetoException e) { @@ -152,16 +152,4 @@ public class SmEditAccessible extends TestCase { log.println( " disposing xMathDoc " ); xMathDoc.dispose(); } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(1000) ; - } catch (InterruptedException e) { - log.println("While waiting :" + e) ; - } - } } // finish class SmModel diff --git a/qadevOOo/tests/java/mod/_sm/SmGraphicAccessible.java b/qadevOOo/tests/java/mod/_sm/SmGraphicAccessible.java index eabf3fe888e8..6c9bc29a4917 100644 --- a/qadevOOo/tests/java/mod/_sm/SmGraphicAccessible.java +++ b/qadevOOo/tests/java/mod/_sm/SmGraphicAccessible.java @@ -132,9 +132,9 @@ public class SmGraphicAccessible extends TestCase { try { xAC.grabFocus(); xPS.setPropertyValue("Formula", "sum hat x"); - shortWait(); + util.utils.pause(1000); xPS.setPropertyValue("Formula", expFormula); - shortWait(); + util.utils.pause(1000); } catch(com.sun.star.lang.WrappedTargetException e) { } catch(com.sun.star.lang.IllegalArgumentException e) { } catch(com.sun.star.beans.PropertyVetoException e) { @@ -155,16 +155,4 @@ public class SmGraphicAccessible extends TestCase { log.println( " disposing xMathDoc " ); xMathDoc.dispose(); } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(1000) ; - } catch (InterruptedException e) { - log.println("While waiting :" + e) ; - } - } } // finish class SmModel diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java index 6fe1e58b1942..bc34cc9c0f86 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java @@ -102,7 +102,7 @@ public class AccessibleBrowseBox extends TestCase { throw new StatusException("Couldn't create document", e); } - shortWait(); + util.utils.pause(5000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -121,7 +121,7 @@ public class AccessibleBrowseBox extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(the_url, noArgs); - shortWait(); + util.utils.pause(5000); XFrame the_frame1 = the_Desk.getCurrentFrame(); @@ -148,7 +148,7 @@ public class AccessibleBrowseBox extends TestCase { final PropertyValue[] fParams = params; - shortWait(); + util.utils.pause(5000); XWindow xWindow = secondController.getFrame().getContainerWindow(); @@ -177,16 +177,4 @@ public class AccessibleBrowseBox extends TestCase { return tEnv; } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e); - } - } } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java index 8e540d2e2476..8a4d3c2fb857 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java @@ -132,7 +132,7 @@ public class AccessibleBrowseBoxHeaderBar extends TestCase { throw new StatusException("Couldn't create document", e); } - shortWait(); + util.utils.pause(5000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -171,7 +171,7 @@ public class AccessibleBrowseBoxHeaderBar extends TestCase { param3.Value = "biblio"; params[2] = param3; - shortWait(); + util.utils.pause(5000); XFrame the_frame1 = the_Desk.getCurrentFrame(); @@ -207,14 +207,14 @@ public class AccessibleBrowseBoxHeaderBar extends TestCase { TestEnvironment tEnv = new TestEnvironment(oObj); - shortWait(); + util.utils.pause(5000); XAccessibleComponent accComp = UnoRuntime.queryInterface( XAccessibleComponent.class, oObj); final Point point = accComp.getLocationOnScreen(); - shortWait(); + util.utils.pause(5000); tEnv.addObjRelation("EventProducer", new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() { @@ -231,16 +231,4 @@ public class AccessibleBrowseBoxHeaderBar extends TestCase { return tEnv; } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e); - } - } } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java index 5faa71a65272..373307306db9 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java @@ -132,7 +132,7 @@ public class AccessibleBrowseBoxHeaderCell extends TestCase { throw new StatusException( "Couldn't create document", e ); } - shortWait(); + util.utils.pause(5000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -150,7 +150,7 @@ public class AccessibleBrowseBoxHeaderCell extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(the_url, noArgs); - shortWait(); + util.utils.pause(5000); XFrame the_frame1 = the_Desk.getCurrentFrame(); @@ -214,16 +214,4 @@ public class AccessibleBrowseBoxHeaderCell extends TestCase { return tEnv; } - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTable.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTable.java index 8ebb43abe371..6cf139093d53 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTable.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTable.java @@ -132,7 +132,7 @@ public class AccessibleBrowseBoxTable extends TestCase { throw new StatusException("Couldn't create document", e); } - shortWait(); + util.utils.pause(5000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -154,7 +154,7 @@ public class AccessibleBrowseBoxTable extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(the_url, noArgs); - shortWait(); + util.utils.pause(5000); XFrame the_frame1 = the_Desk.getCurrentFrame(); @@ -212,16 +212,4 @@ public class AccessibleBrowseBoxTable extends TestCase { return tEnv; } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e); - } - } } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java index 98ec82a9699e..94627bb96bf4 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java @@ -129,7 +129,7 @@ public class AccessibleBrowseBoxTableCell extends TestCase { throw new StatusException( "Couldn't create document", e ); } - shortWait(); + util.utils.pause(5000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -147,7 +147,7 @@ public class AccessibleBrowseBoxTableCell extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(the_url,noArgs); - shortWait(); + util.utils.pause(5000); XFrame the_frame1 = the_Desk.getCurrentFrame(); @@ -178,7 +178,7 @@ public class AccessibleBrowseBoxTableCell extends TestCase { param3.Value = "biblio"; params[2] = param3; - shortWait(); + util.utils.pause(5000); XWindow xWindow = secondController.getFrame().getContainerWindow(); @@ -199,16 +199,4 @@ public class AccessibleBrowseBoxTableCell extends TestCase { return tEnv; } - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java index 7901d40c6e13..da90e9fe0501 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java @@ -152,7 +152,7 @@ public class AccessibleIconChoiceCtrl extends TestCase { throw new StatusException("Couldn't create document", e); } - shortWait(); + util.utils.pause(5000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -187,7 +187,7 @@ public class AccessibleIconChoiceCtrl extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(url[0], noArgs); - shortWait(); + util.utils.pause(5000); XInterface oObj = null; @@ -203,7 +203,7 @@ public class AccessibleIconChoiceCtrl extends TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, oObj); - shortWait(); + util.utils.pause(5000); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow()); @@ -263,16 +263,4 @@ public class AccessibleIconChoiceCtrl extends TestCase { return tEnv; } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e); - } - } } \ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java index 3f15454992c1..b979ec1088ad 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java @@ -156,7 +156,7 @@ public class AccessibleIconChoiceCtrlEntry extends TestCase { throw new StatusException( "Couldn't create document", e ); } - shortWait(); + util.utils.pause(5000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -187,7 +187,7 @@ public class AccessibleIconChoiceCtrlEntry extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(url[0], noArgs); - shortWait(); + util.utils.pause(5000); XInterface oObj = null; try { @@ -201,7 +201,7 @@ public class AccessibleIconChoiceCtrlEntry extends TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface(XExtendedToolkit.class, oObj); - shortWait(); + util.utils.pause(5000); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow()); @@ -236,16 +236,4 @@ public class AccessibleIconChoiceCtrlEntry extends TestCase { return tEnv; } - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java index f7843961c7bf..9803a450272a 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java @@ -97,11 +97,11 @@ public class AccessibleTabBar extends TestCase { throw new StatusException("Couldn't create document", e); } - shortWait(); + util.utils.pause(5000); XInterface oObj = null; - shortWait(); + util.utils.pause(5000); XWindow xWindow = UnoRuntime.queryInterface(XModel.class, xDoc). getCurrentController().getFrame().getContainerWindow(); @@ -126,18 +126,6 @@ public class AccessibleTabBar extends TestCase { return tEnv; } - /** - * Sleeps for 3 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e); - } - } - protected void closeDoc(XComponent xDoc) { XCloseable closer = UnoRuntime.queryInterface( XCloseable.class, xDoc); diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPage.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPage.java index 2473d4a09724..73226ab751dc 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPage.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPage.java @@ -118,7 +118,7 @@ public class AccessibleTabBarPage extends TestCase { throw new StatusException( "Couldn't create document", e ); } - shortWait(); + util.utils.pause(5000); XInterface oObj = null; @@ -135,7 +135,7 @@ public class AccessibleTabBarPage extends TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface(XExtendedToolkit.class, oObj); - shortWait(); + util.utils.pause(5000); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class,tk.getActiveTopWindow()); @@ -167,16 +167,4 @@ public class AccessibleTabBarPage extends TestCase { return tEnv; } - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPageList.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPageList.java index 559b62e65be5..5290e65bcd5d 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPageList.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPageList.java @@ -120,7 +120,7 @@ public class AccessibleTabBarPageList extends TestCase { throw new StatusException("Couldn't create document", e); } - shortWait(); + util.utils.pause(5000); XInterface oObj = null; @@ -136,7 +136,7 @@ public class AccessibleTabBarPageList extends TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, oObj); - shortWait(); + util.utils.pause(5000); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow()); @@ -171,18 +171,6 @@ public class AccessibleTabBarPageList extends TestCase { return tEnv; } - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e); - } - } - protected void closeDoc() { XCloseable closer = UnoRuntime.queryInterface( XCloseable.class, xDoc); diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java index 38b826c4d277..40fe66ad8e71 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java @@ -138,7 +138,7 @@ public class AccessibleTreeListBox extends TestCase { throw new StatusException( "Couldn't create document", e ); } - shortWait(); + util.utils.pause(5000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -156,7 +156,7 @@ public class AccessibleTreeListBox extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(the_url, noArgs); - shortWait(); + util.utils.pause(5000); XFrame the_frame1 = the_Desk.getCurrentFrame(); @@ -216,16 +216,4 @@ public class AccessibleTreeListBox extends TestCase { return tEnv; } - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - } diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java index 8cf434ccc67f..996ef88b43c4 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java @@ -156,7 +156,7 @@ public class AccessibleTreeListBoxEntry extends TestCase { throw new StatusException("Couldn't create document", e); } - shortWait(); + util.utils.pause(5000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -178,7 +178,7 @@ public class AccessibleTreeListBoxEntry extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(the_url, noArgs); - shortWait(); + util.utils.pause(5000); XFrame the_frame1 = the_Desk.getCurrentFrame(); @@ -223,7 +223,7 @@ public class AccessibleTreeListBoxEntry extends TestCase { throw new StatusException("Could not select Biblio-Database", ex); } - shortWait(); + util.utils.pause(5000); XWindow xWindow = secondController.getFrame().getContainerWindow(); @@ -259,18 +259,6 @@ public class AccessibleTreeListBoxEntry extends TestCase { return tEnv; } - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e); - } - } - protected void closeDoc() { XCloseable closer = UnoRuntime.queryInterface( XCloseable.class, xTextDoc); diff --git a/qadevOOo/tests/java/mod/_svx/AccessibleControlShape.java b/qadevOOo/tests/java/mod/_svx/AccessibleControlShape.java index 6abafcb1d086..25a7df2cea5b 100644 --- a/qadevOOo/tests/java/mod/_svx/AccessibleControlShape.java +++ b/qadevOOo/tests/java/mod/_svx/AccessibleControlShape.java @@ -81,7 +81,7 @@ public class AccessibleControlShape extends TestCase { final XShape oShape = FormTools.insertControlShape (xDrawDoc,3000,4500,15000,1000,"CommandButton"); - utils.shortWait(5000); + utils.pause(5000); XWindow xWindow = AccessibilityTools.getCurrentWindow (aModel); XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow); diff --git a/qadevOOo/tests/java/mod/_svx/AccessibleEditableTextPara.java b/qadevOOo/tests/java/mod/_svx/AccessibleEditableTextPara.java index f4fe8173764b..77db894d1cf8 100644 --- a/qadevOOo/tests/java/mod/_svx/AccessibleEditableTextPara.java +++ b/qadevOOo/tests/java/mod/_svx/AccessibleEditableTextPara.java @@ -128,23 +128,11 @@ public class AccessibleEditableTextPara extends TestCase { try { log.println("creating a spreadsheetdocument"); xSpreadsheetDoc = UnoRuntime.queryInterface(XComponent.class,SOF.createCalcDoc(null)); - shortWait(); + util.utils.pause(500); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException( "Couldn't create document ", e ); } } - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(500) ; - } catch (InterruptedException e) { - log.println("While waiting :" + e) ; - } - } - } diff --git a/qadevOOo/tests/java/mod/_svx/SvxGraphCtrlAccessibleContext.java b/qadevOOo/tests/java/mod/_svx/SvxGraphCtrlAccessibleContext.java index d4efa3ee73be..1249ef898420 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxGraphCtrlAccessibleContext.java +++ b/qadevOOo/tests/java/mod/_svx/SvxGraphCtrlAccessibleContext.java @@ -114,7 +114,7 @@ public class SvxGraphCtrlAccessibleContext extends TestCase{ XDispatch xDispatcher = xDispProv.queryDispatch( aURL,"",0); if( xDispatcher != null ) xDispatcher.dispatch( aURL, null ); - utils.shortWait(Param.getInt(util.PropertyName.SHORT_WAIT)); + utils.shortWait(); } catch (com.sun.star.uno.Exception e) { log.println("Couldn't change mode"); } diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java index cbfcce7fd050..9348e86f041b 100644 --- a/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java +++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java @@ -113,7 +113,7 @@ public class SwAccessibleDocumentPageView extends TestCase { throw new StatusException(e, Status.failed("Couldn't change mode")); } - shortWait(); + util.utils.pause(2000); XWindow xWindow = AccessibilityTools.getCurrentWindow(aModel); XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow); @@ -131,7 +131,7 @@ public class SwAccessibleDocumentPageView extends TestCase { public void fireEvent() { String oldText = the_text.getString(); the_text.setString("EVENT FIRED"); - shortWait(); + util.utils.pause(2000); the_text.setString(oldText); } }); @@ -141,19 +141,6 @@ public class SwAccessibleDocumentPageView extends TestCase { } - /** - * Sleeps for 1 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(2000) ; - } catch (InterruptedException e) { - log.println("While waiting :" + e) ; - } - } - - /** * Called while disposing a TestEnvironment. * Disposes text document. diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java b/qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java index 3c32a7cd9b81..84fa8139cf68 100644 --- a/qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java +++ b/qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java @@ -144,7 +144,7 @@ public class SwAccessiblePageView extends TestCase { throw new StatusException( "Couldn't get Paragraph", e ); } - shortWait(); + util.utils.pause(500); XController xController = xTextDoc.getCurrentController(); @@ -168,7 +168,7 @@ public class SwAccessiblePageView extends TestCase { throw new StatusException(e, Status.failed("Couldn't change mode")); } - shortWait(); + util.utils.pause(500); XWindow xWindow = AccessibilityTools.getCurrentWindow(aModel); XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow); @@ -251,16 +251,4 @@ public class SwAccessiblePageView extends TestCase { log.println( "creating a text document" ); xTextDoc = WriterTools.createTextDoc(Param.getMSF()); } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(500) ; - } catch (InterruptedException e) { - log.println("While waiting :" + e) ; - } - } } diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java index da8ddffd0747..1b8f2461eb23 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java @@ -100,14 +100,14 @@ public class AccessibleButton extends lib.TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, oObj); - util.utils.shortWait(Param.getInt("ShortWait")); + util.utils.pause(Param.getInt("ShortWait")); DiagThread psDiag = new DiagThread(xTextDoc, msf); psDiag.start(); - util.utils.shortWait(Param.getInt("ShortWait")); + util.utils.pause(Param.getInt("ShortWait")); - util.utils.shortWait(Param.getInt("ShortWait")); + util.utils.pause(Param.getInt("ShortWait")); Object atw = tk.getActiveTopWindow(); diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleCheckBox.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleCheckBox.java index 06d85ac874c0..6def9bb8fe93 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleCheckBox.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleCheckBox.java @@ -103,7 +103,7 @@ public class AccessibleCheckBox extends TestCase { } } - util.utils.shortWait(Param.getInt("ShortWait")); + util.utils.pause(Param.getInt("ShortWait")); XInterface oObj = null; @@ -120,16 +120,16 @@ public class AccessibleCheckBox extends TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, oObj); - util.utils.shortWait(Param.getInt("ShortWait")); + util.utils.pause(Param.getInt("ShortWait")); log.println("Opening Dialog in second thread"); psDiag = new DiagThread(xTextDoc, msf); psDiag.start(); - util.utils.shortWait(Param.getInt("ShortWait")); + util.utils.pause(Param.getInt("ShortWait")); - util.utils.shortWait(Param.getInt("ShortWait")); + util.utils.pause(Param.getInt("ShortWait")); log.println("Getting the active TopWindow"); diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleComboBox.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleComboBox.java index d7bb63033fbb..d48bd0b4763c 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleComboBox.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleComboBox.java @@ -98,7 +98,7 @@ public class AccessibleComboBox extends TestCase { Param.getMSF()); psDiag.start(); - util.utils.shortWait(Param.getInt("ShortWait")); + util.utils.pause(Param.getInt("ShortWait")); Object atw = tk.getActiveTopWindow(); @@ -124,7 +124,7 @@ public class AccessibleComboBox extends TestCase { } catch (com.sun.star.lang.IndexOutOfBoundsException e) { e.printStackTrace(log); } - util.utils.shortWait(Param.getInt("ShortWait")); + util.utils.pause(Param.getInt("ShortWait")); AccessibilityTools.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE)); oObj = AccessibilityTools.getAccessibleObjectForRole(xRoot, AccessibleRole.PANEL, "", diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleDropDownListBox.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleDropDownListBox.java index 46e1aa1a2063..284f7a554494 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleDropDownListBox.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleDropDownListBox.java @@ -73,7 +73,7 @@ public class AccessibleDropDownListBox extends TestCase { PrintWriter log) { XInterface oObj = null; - shortWait(); + util.utils.pause(500); XWindow xWindow = AccessibilityTools.getCurrentWindow( xTextDoc); @@ -128,16 +128,4 @@ public class AccessibleDropDownListBox extends TestCase { protected void cleanup(TestParameters Param, PrintWriter log) { util.DesktopTools.closeDoc(xTextDoc); } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - log.println("While waiting :" + e); - } - } } diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleEdit.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleEdit.java index 6df7063268bc..270a5ff512d1 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleEdit.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleEdit.java @@ -135,7 +135,7 @@ public class AccessibleEdit extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(url[0], noArgs); - shortWait(); + util.utils.pause(500); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow()); @@ -208,16 +208,4 @@ public class AccessibleEdit extends TestCase { throw new StatusException("Can't create document", e); } } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - log.println("While waiting :" + e); - } - } } \ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleFixedText.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleFixedText.java index 22eab84d3949..873d643a96c2 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleFixedText.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleFixedText.java @@ -137,7 +137,7 @@ public class AccessibleFixedText extends TestCase { throw new StatusException("Couldn't get toolkit", e); } - shortWait(); + util.utils.pause(500); XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWinDlg); @@ -181,16 +181,4 @@ public class AccessibleFixedText extends TestCase { log.println(" Closing dialog ... "); xWinDlg.dispose(); } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - log.println("While waiting :" + e); - } - } } \ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleList.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleList.java index 82a4b8d09ee6..12992f9209a8 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleList.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleList.java @@ -78,7 +78,7 @@ public class AccessibleList extends TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, oObj); - shortWait(); + util.utils.pause(1000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -113,7 +113,7 @@ public class AccessibleList extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(url[0], noArgs); - shortWait(); + util.utils.pause(1000); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow()); @@ -136,7 +136,7 @@ public class AccessibleList extends TestCase { XAccessibleSelection.class, oObj); xAccSel.selectAccessibleChild(3); - shortWait(); + util.utils.pause(1000); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { throw new StatusException("Can't switch to required tab", e); } @@ -213,16 +213,4 @@ public class AccessibleList extends TestCase { throw new StatusException("Can't create document", e); } } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - log.println("While waiting :" + e); - } - } } \ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleListBox.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleListBox.java index 8a855caa0ed9..7eaf80d757e8 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleListBox.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleListBox.java @@ -101,7 +101,7 @@ public class AccessibleListBox extends TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, oObj); - shortWait(); + util.utils.pause(1000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -136,7 +136,7 @@ public class AccessibleListBox extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(url[0], noArgs); - shortWait(); + util.utils.pause(1000); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow()); @@ -160,7 +160,7 @@ public class AccessibleListBox extends TestCase { XAccessibleSelection.class, oObj); xAccSel.selectAccessibleChild(3); - shortWait(); + util.utils.pause(1000); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { throw new StatusException("Can't switch to required tab", e); } @@ -225,16 +225,4 @@ public class AccessibleListBox extends TestCase { throw new StatusException("Can't create document", e); } } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - log.println("While waiting :" + e); - } - } } \ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleListItem.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleListItem.java index 95962691b467..1443a4a68aed 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleListItem.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleListItem.java @@ -99,7 +99,7 @@ public class AccessibleListItem extends TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, oObj); - shortWait(); + util.utils.pause(1000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -134,7 +134,7 @@ public class AccessibleListItem extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(url[0], noArgs); - shortWait(); + util.utils.pause(1000); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow()); @@ -157,7 +157,7 @@ public class AccessibleListItem extends TestCase { XAccessibleSelection.class, oObj); xAccSel.selectAccessibleChild(3); - shortWait(); + util.utils.pause(1000); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { throw new StatusException("Can't switch to required tab", e); } @@ -217,16 +217,4 @@ public class AccessibleListItem extends TestCase { throw new StatusException("Can't create document", e); } } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - log.println("While waiting :" + e); - } - } } \ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleMenu.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleMenu.java index 844f96ce76d0..5c83d76d4f0b 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleMenu.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleMenu.java @@ -92,7 +92,7 @@ public class AccessibleMenu extends TestCase { throw new StatusException("Can't create document", e); } - shortWait(); + util.utils.pause(500); XWindow xWindow = UnoRuntime.queryInterface(XModel.class, xTextDoc). getCurrentController().getFrame().getContainerWindow(); @@ -126,10 +126,7 @@ public class AccessibleMenu extends TestCase { try { act2.doAccessibleAction(0); - try { - Thread.sleep(500); - } catch (InterruptedException e) { - } + util.utils.pause(500); act1.doAccessibleAction(0); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { @@ -170,16 +167,4 @@ public class AccessibleMenu extends TestCase { @Override protected void initialize(TestParameters Param, PrintWriter log) { } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - log.println("While waiting :" + e); - } - } } \ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleMenuBar.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleMenuBar.java index f0330df7feea..5b91847a95cf 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleMenuBar.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleMenuBar.java @@ -71,7 +71,7 @@ public class AccessibleMenuBar extends TestCase { @Override protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) { - shortWait(); + util.utils.pause(500); XWindow xWindow = UnoRuntime.queryInterface(XModel.class, xTextDoc). getCurrentController().getFrame().getContainerWindow(); @@ -128,16 +128,4 @@ public class AccessibleMenuBar extends TestCase { protected void cleanup(TestParameters Param, PrintWriter log) { util.DesktopTools.closeDoc(xTextDoc); } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - log.println("While waiting :" + e); - } - } } \ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleMenuItem.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleMenuItem.java index 4b5a9514c5c7..6b1da6f840cf 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleMenuItem.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleMenuItem.java @@ -95,7 +95,7 @@ public class AccessibleMenuItem extends TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, oObj); - shortWait(); + util.utils.pause(500); Object atw = tk.getActiveTopWindow(); @@ -114,7 +114,7 @@ public class AccessibleMenuItem extends TestCase { XAccessibleAction act = UnoRuntime.queryInterface( XAccessibleAction.class, Menu); act.doAccessibleAction(0); - shortWait(); + util.utils.pause(500); //get a menue-item @@ -177,16 +177,4 @@ public class AccessibleMenuItem extends TestCase { protected void cleanup(TestParameters Param, PrintWriter log) { util.DesktopTools.closeDoc(xTextDoc); } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - log.println("While waiting :" + e); - } - } } \ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleMenuSeparator.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleMenuSeparator.java index 0e3d97d05acb..f78335981175 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleMenuSeparator.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleMenuSeparator.java @@ -73,7 +73,7 @@ public class AccessibleMenuSeparator extends TestCase { @Override protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) { - shortWait(); + util.utils.pause(500); XWindow xWindow = UnoRuntime.queryInterface(XModel.class, xTextDoc). getCurrentController().getFrame().getContainerWindow(); @@ -93,7 +93,7 @@ public class AccessibleMenuSeparator extends TestCase { XAccessibleAction.class, Menu); act.doAccessibleAction(0); - shortWait(); + util.utils.pause(500); //get a menue-separator @@ -144,16 +144,4 @@ public class AccessibleMenuSeparator extends TestCase { protected void cleanup(TestParameters Param, PrintWriter log) { util.DesktopTools.closeDoc(xTextDoc); } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - log.println("While waiting :" + e); - } - } } \ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessiblePopupMenu.java b/qadevOOo/tests/java/mod/_toolkit/AccessiblePopupMenu.java index 335c8994d977..81da3dd50253 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessiblePopupMenu.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessiblePopupMenu.java @@ -135,7 +135,7 @@ public class AccessiblePopupMenu extends TestCase { throw new StatusException("Couldn't create document", e); } - shortWait(tParam); + util.utils.shortWait(); XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -166,7 +166,7 @@ public class AccessiblePopupMenu extends TestCase { log.println("couldn't press mouse button"); } - shortWait(tParam); + util.utils.shortWait(); XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, toolkit); @@ -212,8 +212,4 @@ public class AccessiblePopupMenu extends TestCase { protected void closeDoc() { util.DesktopTools.closeDoc(xTextDoc); } - - private void shortWait(TestParameters tParam) { - util.utils.shortWait(tParam.getInt(util.PropertyName.SHORT_WAIT)); - } } diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleRadioButton.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleRadioButton.java index 748a64a0496e..c00e6d340610 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleRadioButton.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleRadioButton.java @@ -168,7 +168,7 @@ public class AccessibleRadioButton extends TestCase { throw new StatusException("Couldn't create document", e); } - util.utils.shortWait(2000); + util.utils.pause(2000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -203,7 +203,7 @@ public class AccessibleRadioButton extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(url[0], noArgs); - util.utils.shortWait(2000); + util.utils.pause(2000); XInterface oObj = null; @@ -219,7 +219,7 @@ public class AccessibleRadioButton extends TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, oObj); - util.utils.shortWait(2000); + util.utils.pause(2000); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow()); diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java index e89dba8f95a7..053bbebeb3fc 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java @@ -160,7 +160,7 @@ public class AccessibleTabControl extends TestCase { throw new StatusException("Couldn't create document", e); } - shortWait(); + util.utils.pause(500); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -195,7 +195,7 @@ public class AccessibleTabControl extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(url[0], noArgs); - shortWait(); + util.utils.pause(500); XInterface oObj = null; @@ -211,7 +211,7 @@ public class AccessibleTabControl extends TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, oObj); - shortWait(); + util.utils.pause(500); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow()); @@ -255,16 +255,4 @@ public class AccessibleTabControl extends TestCase { return tEnv; } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e); - } - } } diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java index ae18f9174a8e..abdc09b9dd2a 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java @@ -97,7 +97,7 @@ public class AccessibleTabPage extends TestCase { if (accCloseButton != null) { log.println("closing InsertFields Dialog"); accCloseButton.doAccessibleAction(0); - shortWait(); + util.utils.pause(1000); } } catch (com.sun.star.lang.IndexOutOfBoundsException e) { e.printStackTrace(log); @@ -140,7 +140,7 @@ public class AccessibleTabPage extends TestCase { if (accCloseButton != null) { log.println("closing InsertFields Dialog"); accCloseButton.doAccessibleAction(0); - shortWait(); + util.utils.pause(1000); } } catch (com.sun.star.lang.IndexOutOfBoundsException e) { e.printStackTrace(log); @@ -167,7 +167,7 @@ public class AccessibleTabPage extends TestCase { throw new StatusException("Couldn't create document", e); } - shortWait(); + util.utils.pause(1000); XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc); @@ -202,7 +202,7 @@ public class AccessibleTabPage extends TestCase { PropertyValue[] noArgs = new PropertyValue[0]; getting.dispatch(url[0], noArgs); - shortWait(); + util.utils.pause(1000); XInterface oObj = null; @@ -218,7 +218,7 @@ public class AccessibleTabPage extends TestCase { XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, oObj); - shortWait(); + util.utils.pause(1000); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow()); @@ -246,7 +246,7 @@ public class AccessibleTabPage extends TestCase { oObj); accComp.getLocationOnScreen(); - shortWait(); + util.utils.pause(1000); XInterface xEventInt = AccessibilityTools.getAccessibleObjectForRole(xRoot, AccessibleRole.PAGE_TAB, "Variables"); final XAccessibleComponent eventAccComp = UnoRuntime.queryInterface( @@ -263,18 +263,6 @@ public class AccessibleTabPage extends TestCase { return tEnv; } - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e); - } - } - protected void closeDoc() { util.DesktopTools.closeDoc(xTextDoc); } -- cgit