[Libreoffice-commits] core.git: framework/qa qadevOOo/runner qadevOOo/tests sc/qa sfx2/qa toolkit/qa vcl/qa

Noel Grandin noel at peralex.com
Wed Jun 10 23:47:53 PDT 2015


 framework/qa/complex/XUserInputInterception/EventTest.java                   |    4 -
 framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java |    6 -
 qadevOOo/runner/lib/MultiMethodTest.java                                     |    6 +
 qadevOOo/runner/util/DesktopTools.java                                       |    4 -
 qadevOOo/runner/util/utils.java                                              |   19 +++-
 qadevOOo/tests/java/ifc/accessibility/_XAccessibleEventBroadcaster.java      |    6 -
 qadevOOo/tests/java/ifc/accessibility/_XAccessibleSelection.java             |   14 +--
 qadevOOo/tests/java/ifc/awt/_XImageProducer.java                             |    2 
 qadevOOo/tests/java/ifc/awt/_XItemListener.java                              |    2 
 qadevOOo/tests/java/ifc/awt/_XRadioButton.java                               |    2 
 qadevOOo/tests/java/ifc/awt/_XScrollBar.java                                 |    8 +-
 qadevOOo/tests/java/ifc/awt/_XSpinField.java                                 |   18 ++--
 qadevOOo/tests/java/ifc/awt/_XSpinValue.java                                 |    8 +-
 qadevOOo/tests/java/ifc/awt/_XTextComponent.java                             |    4 -
 qadevOOo/tests/java/ifc/awt/_XTextListener.java                              |    2 
 qadevOOo/tests/java/ifc/awt/_XTopWindow.java                                 |    2 
 qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java                     |    5 -
 qadevOOo/tests/java/ifc/awt/_XWindow.java                                    |   16 ++--
 qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java                        |    4 -
 qadevOOo/tests/java/ifc/container/_XContainer.java                           |    4 -
 qadevOOo/tests/java/ifc/container/_XIndexAccess.java                         |    2 
 qadevOOo/tests/java/ifc/document/_XEventBroadcaster.java                     |    6 -
 qadevOOo/tests/java/ifc/form/_XChangeBroadcaster.java                        |    6 -
 qadevOOo/tests/java/ifc/form/_XFormController.java                           |    8 +-
 qadevOOo/tests/java/ifc/form/_XLoadable.java                                 |    6 -
 qadevOOo/tests/java/ifc/form/_XReset.java                                    |    6 -
 qadevOOo/tests/java/ifc/form/_XSubmit.java                                   |    2 
 qadevOOo/tests/java/ifc/form/_XUpdateBroadcaster.java                        |   20 ++---
 qadevOOo/tests/java/ifc/form/submission/_XSubmission.java                    |    2 
 qadevOOo/tests/java/ifc/frame/_XComponentLoader.java                         |    6 -
 qadevOOo/tests/java/ifc/frame/_XDispatch.java                                |    6 -
 qadevOOo/tests/java/ifc/frame/_XDispatchRecorder.java                        |    4 -
 qadevOOo/tests/java/ifc/frame/_XDispatchRecorderSupplier.java                |    4 -
 qadevOOo/tests/java/ifc/frame/_XFrame.java                                   |    9 +-
 qadevOOo/tests/java/ifc/frame/_XFrameLoader.java                             |   10 +-
 qadevOOo/tests/java/ifc/frame/_XNotifyingDispatch.java                       |    2 
 qadevOOo/tests/java/ifc/frame/_XSynchronousFrameLoader.java                  |    3 
 qadevOOo/tests/java/ifc/io/_XActiveDataControl.java                          |    2 
 qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java           |    2 
 qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java                          |   18 ++--
 qadevOOo/tests/java/ifc/system/_XSystemShellExecute.java                     |    2 
 qadevOOo/tests/java/ifc/task/_XJobExecutor.java                              |    2 
 qadevOOo/tests/java/ifc/text/_XDocumentIndex.java                            |    2 
 qadevOOo/tests/java/ifc/text/_XMailMergeBroadcaster.java                     |    4 -
 qadevOOo/tests/java/ifc/text/_XPagePrintable.java                            |    4 -
 qadevOOo/tests/java/ifc/ui/_XContextMenuInterception.java                    |    5 -
 qadevOOo/tests/java/ifc/ui/dialogs/_XExecutableDialog.java                   |    2 
 qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerNotifier.java                 |    4 -
 qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java                      |    4 -
 qadevOOo/tests/java/mod/_basctl/AccessibleShape.java                         |    6 -
 qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java           |   40 +++-------
 qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java                 |   34 ++------
 qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java                    |    4 -
 qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java                          |    2 
 qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java              |   31 ++-----
 qadevOOo/tests/java/mod/_forms/OTimeControl.java                             |    2 
 qadevOOo/tests/java/mod/_fwk/DispatchRecorder.java                           |    2 
 qadevOOo/tests/java/mod/_fwk/JobExecutor.java                                |    2 
 qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_HeaderFooter.java     |    6 -
 qadevOOo/tests/java/mod/_sc/ScAccessibleCsvCell.java                         |    2 
 qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java                         |    2 
 qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java                        |    2 
 qadevOOo/tests/java/mod/_sc/ScAccessibleDocument.java                        |    2 
 qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java             |    2 
 qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java                  |    2 
 qadevOOo/tests/java/mod/_sc/ScTabViewObj.java                                |    2 
 qadevOOo/tests/java/mod/_sd/AccessibleOutlineView.java                       |    4 -
 qadevOOo/tests/java/mod/_sd/AccessibleSlideView.java                         |    7 -
 qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java                     |    8 +-
 qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java                  |   10 +-
 qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java                    |   10 +-
 qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java                  |   10 +-
 qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java             |   10 +-
 qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java                               |    6 -
 qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java                            |    4 -
 qadevOOo/tests/java/mod/_sd/SdUnoPresView.java                               |    2 
 qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java                              |    4 -
 qadevOOo/tests/java/mod/_sm/SmEditAccessible.java                            |    6 -
 qadevOOo/tests/java/mod/_sm/SmGraphicAccessible.java                         |    6 -
 qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java                    |    6 -
 qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java           |    8 +-
 qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java          |    4 -
 qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTable.java               |    4 -
 qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java           |    6 -
 qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java               |    6 -
 qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java          |    6 -
 qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java                       |    4 -
 qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPage.java                   |    4 -
 qadevOOo/tests/java/mod/_svtools/AccessibleTabBarPageList.java               |    4 -
 qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java                  |    4 -
 qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java             |    6 -
 qadevOOo/tests/java/mod/_svx/AccessibleControlShape.java                     |    2 
 qadevOOo/tests/java/mod/_svx/AccessibleEditableTextPara.java                 |    4 -
 qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java                |    6 -
 qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java                        |    4 -
 qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java                       |    2 
 qadevOOo/tests/java/mod/_toolkit/AccessibleCheckBox.java                     |    4 -
 qadevOOo/tests/java/mod/_toolkit/AccessibleComboBox.java                     |    2 
 qadevOOo/tests/java/mod/_toolkit/AccessibleDropDownListBox.java              |    2 
 qadevOOo/tests/java/mod/_toolkit/AccessibleEdit.java                         |    2 
 qadevOOo/tests/java/mod/_toolkit/AccessibleFixedText.java                    |    2 
 qadevOOo/tests/java/mod/_toolkit/AccessibleList.java                         |    6 -
 qadevOOo/tests/java/mod/_toolkit/AccessibleListBox.java                      |    6 -
 qadevOOo/tests/java/mod/_toolkit/AccessibleListItem.java                     |    6 -
 qadevOOo/tests/java/mod/_toolkit/AccessibleMenu.java                         |    6 -
 qadevOOo/tests/java/mod/_toolkit/AccessibleMenuBar.java                      |    2 
 qadevOOo/tests/java/mod/_toolkit/AccessibleMenuItem.java                     |    7 -
 qadevOOo/tests/java/mod/_toolkit/AccessibleMenuSeparator.java                |    7 -
 qadevOOo/tests/java/mod/_toolkit/AccessiblePopupMenu.java                    |    2 
 qadevOOo/tests/java/mod/_toolkit/AccessibleRadioButton.java                  |    6 -
 qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java                   |    6 -
 qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java                      |   12 +--
 qadevOOo/tests/java/mod/_toolkit/UnoControlContainer.java                    |    3 
 sc/qa/complex/calcPreview/ViewForwarder.java                                 |   14 +--
 sfx2/qa/complex/sfx2/GlobalEventBroadcaster.java                             |   20 ++---
 sfx2/qa/complex/sfx2/tools/WriterHelper.java                                 |    2 
 toolkit/qa/complex/toolkit/AccessibleStatusBar.java                          |   12 +--
 toolkit/qa/complex/toolkit/AccessibleStatusBarItem.java                      |   12 +--
 toolkit/qa/complex/toolkit/accessibility/_XAccessibleEventBroadcaster.java   |   21 ++---
 vcl/qa/complex/persistent_window_states/DocumentHandle.java                  |   26 +++---
 vcl/qa/complex/persistent_window_states/PersistentWindowTest.java            |    4 -
 121 files changed, 373 insertions(+), 418 deletions(-)

New commits:
commit 754ade38ddb2e96187d00f3e621203cea34961fa
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Jun 9 13:27:06 2015 +0200

    speed up Java unit tests by removing sleeps
    
    and replacing them with a call to XToolkitExperimental::
    processEventsToIdle
    
    Change-Id: I9fd6cb8af43d902587186310aebe78b5a5ee6932
    Reviewed-on: https://gerrit.libreoffice.org/16201
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/framework/qa/complex/XUserInputInterception/EventTest.java b/framework/qa/complex/XUserInputInterception/EventTest.java
index 86c0051..fc92beb 100644
--- a/framework/qa/complex/XUserInputInterception/EventTest.java
+++ b/framework/qa/complex/XUserInputInterception/EventTest.java
@@ -267,7 +267,7 @@ public class EventTest {
 
         et.run();
 
-        util.utils.pause(m_threadWait);
+        util.utils.waitForEventIdle(getMSF());
         System.out.println("key listener thread should be finished.");
 
         assertTrue("key event does not work!", m_keyPressed && m_keyReleased);
@@ -300,7 +300,7 @@ public class EventTest {
 
         et.run();
 
-        util.utils.pause(m_threadWait);
+        util.utils.waitForEventIdle(getMSF());
         System.out.println("mouse listener thread should be finished.");
 
         assertTrue("mouse event does not work!", m_mousePressed && m_mouseReleased);
diff --git a/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java b/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java
index 6516d27..6b3317d 100644
--- a/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java
+++ b/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java
@@ -46,7 +46,6 @@ import util.AccessibilityTools;
 import util.DesktopTools;
 import util.DrawTools;
 import util.SOfficeFactory;
-import util.utils;
 import org.openoffice.test.OfficeFileUrl;
 
 // ---------- junit imports -----------------
@@ -121,7 +120,7 @@ public class CheckContextMenuInterceptor
         xFrame = xModel.getCurrentController().getFrame();
 
         // ensure that the document content is optimal visible
-        DesktopTools.zoomToEntirePage(xDrawDoc);
+        DesktopTools.zoomToEntirePage(xMSF, xDrawDoc);
 
         XBitmap xBitmap = null;
 
@@ -278,8 +277,7 @@ public class CheckContextMenuInterceptor
             System.out.println("couldn't press mouse button");
         }
 
-        utils.pause(3000);
-
+        util.utils.waitForEventIdle(getMSF());
     }
 
     private XMultiServiceFactory getMSF()
diff --git a/qadevOOo/runner/lib/MultiMethodTest.java b/qadevOOo/runner/lib/MultiMethodTest.java
index e7bf886..ab2dd96 100644
--- a/qadevOOo/runner/lib/MultiMethodTest.java
+++ b/qadevOOo/runner/lib/MultiMethodTest.java
@@ -64,6 +64,7 @@ import com.sun.star.uno.UnoRuntime;
  *
  * @see TestResult
  */
+ at SuppressWarnings("unused")
 public class MultiMethodTest
 {
 
@@ -465,4 +466,9 @@ public class MultiMethodTest
     {
         this.getClass().getField(fieldName).set(this, value);
     }
+
+    protected final void waitForEventIdle() {
+        util.utils.waitForEventIdle(tParam.getMSF());
+    }
+
 }
diff --git a/qadevOOo/runner/util/DesktopTools.java b/qadevOOo/runner/util/DesktopTools.java
index 1f6f6cf..00b7fc5 100644
--- a/qadevOOo/runner/util/DesktopTools.java
+++ b/qadevOOo/runner/util/DesktopTools.java
@@ -389,7 +389,7 @@ public class DesktopTools
      * zoom to have a view over the hole page
      * @param xDoc the document to zoom
      */
-    public static void zoomToEntirePage(XInterface xDoc)
+    public static void zoomToEntirePage(XMultiServiceFactory xMSF, XInterface xDoc)
     {
         try
         {
@@ -402,7 +402,7 @@ public class DesktopTools
             oViewProp.setPropertyValue("ZoomType",
                     Short.valueOf(com.sun.star.view.DocumentZoomType.ENTIRE_PAGE));
 
-            utils.pause(5000);
+            util.utils.waitForEventIdle(xMSF);
         }
         catch (Exception e)
         {
diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index 4a77e41..a584b70 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -22,6 +22,7 @@ import com.sun.star.frame.XDispatch;
 import com.sun.star.frame.XDispatchProvider;
 import com.sun.star.frame.XModel;
 import com.sun.star.lang.XComponent;
+
 import java.util.StringTokenizer;
 import java.io.*;
 import java.util.ArrayList;
@@ -30,6 +31,7 @@ import java.net.ServerSocket;
 import java.net.URI;
 import java.net.URISyntaxException;
 
+import com.sun.star.awt.XToolkitExperimental;
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.beans.Property;
 import com.sun.star.lang.XMultiServiceFactory;
@@ -37,17 +39,15 @@ import com.sun.star.uno.UnoRuntime;
 import com.sun.star.ucb.InteractiveAugmentedIOException;
 import com.sun.star.ucb.XSimpleFileAccess;
 import com.sun.star.lang.XServiceInfo;
-
 import com.sun.star.util.URL;
 import com.sun.star.util.XURLTransformer;
-
 import com.sun.star.uno.AnyConverter;
 import com.sun.star.uno.Type;
 import com.sun.star.uno.XComponentContext;
 import com.sun.star.util.XMacroExpander;
+
 import java.text.DecimalFormat;
 import java.util.Calendar;
-
 import java.util.Collections;
 import java.util.GregorianCalendar;
 
@@ -661,6 +661,17 @@ public class utils {
         }
     }
 
+    public static void waitForEventIdle(XMultiServiceFactory xMSF) {
+        try {
+            XToolkitExperimental xToolkit = UnoRuntime.queryInterface(
+                    XToolkitExperimental.class,
+                    xMSF.createInstance("com.sun.star.awt.Toolkit"));
+            xToolkit.processEventsToIdle();
+        } catch (com.sun.star.uno.Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
     /**
      * Validate the AppExecutionCommand. Returned is an error message, starting
      * with "Error:", or a warning, if the command might work.
@@ -832,7 +843,7 @@ public class utils {
             XDispatch xDispatcher = xDispProv.queryDispatch(aURL, "", 0);
             xDispatcher.dispatch(aURL, null);
 
-            utils.pause(3000);
+            waitForEventIdle(xMSF);
 
         } catch (Exception e) {
             throw new Exception("ERROR: could not dispatch URL '" + URL + "'", e);
diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEventBroadcaster.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEventBroadcaster.java
index 3002dbe..a5d0740 100644
--- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEventBroadcaster.java
+++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEventBroadcaster.java
@@ -114,7 +114,7 @@ public class _XAccessibleEventBroadcaster extends MultiMethodTest {
         log.println("fire event");
         prod.fireEvent() ;
 
-        util.utils.pause(3000);
+        waitForEventIdle();
 
         boolean works = true;
 
@@ -148,7 +148,7 @@ public class _XAccessibleEventBroadcaster extends MultiMethodTest {
      *  <li> <code>addEventListener()</code> : to have added listeners </li>
      * </ul>
      */
-    public void _removeEventListener() {
+    public void _removeEventListener() throws Exception {
         requiredMethod("addEventListener()");
 
         list.notifiedEvent = null;
@@ -159,7 +159,7 @@ public class _XAccessibleEventBroadcaster extends MultiMethodTest {
         log.println("fire event");
         prod.fireEvent() ;
 
-        util.utils.shortWait();
+        waitForEventIdle();
 
         if (list.notifiedEvent == null) {
             log.println("listener wasn't called -- OK");
diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleSelection.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleSelection.java
index fdb7d2f..d7e84b7 100644
--- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleSelection.java
+++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleSelection.java
@@ -167,7 +167,7 @@ public class _XAccessibleSelection extends MultiMethodTest {
      * Has OK status if exception was thrown for wrong index and
      * if exception wasn't thrown for the correct index.
      */
-    public void _isAccessibleChildSelected() {
+    public void _isAccessibleChildSelected() throws Exception {
         executeMethod("selectAccessibleChild()");
 
         boolean res = true;
@@ -212,7 +212,7 @@ public class _XAccessibleSelection extends MultiMethodTest {
 
                     if (isSelectable(tEnv.getTestObject(), k)) {
                         oObj.selectAccessibleChild(k);
-                        util.utils.shortWait();
+                        waitForEventIdle();
                         isSelected = oObj.isAccessibleChildSelected(k);
                         log.println("isAccessibleChildSelected - " +
                                     isSelected);
@@ -236,7 +236,7 @@ public class _XAccessibleSelection extends MultiMethodTest {
      * Has OK status if the method <code>isAccessibleChildSelected()</code>
      * returned <code>false</code>.
      */
-    public void _clearAccessibleSelection() {
+    public void _clearAccessibleSelection() throws Exception {
         executeMethod("isAccessibleChildSelected()");
 
         boolean res = true;
@@ -247,7 +247,7 @@ public class _XAccessibleSelection extends MultiMethodTest {
 
         // clearAccessibleSelection() call is oneway so we need
         // some waiting
-        util.utils.shortWait();
+        waitForEventIdle();
 
         if ((childCount > 0) && !OneAlwaysSelected) {
             try {
@@ -284,7 +284,7 @@ public class _XAccessibleSelection extends MultiMethodTest {
 
         // selectAllAccessibleChildren() call is oneway so we need
         // some waiting
-        util.utils.shortWait();
+        waitForEventIdle();
 
         boolean res = true;
         boolean isSelected = true;
@@ -394,7 +394,7 @@ public class _XAccessibleSelection extends MultiMethodTest {
      * if exception wasn't thrown for the correct index and
      * if the method have returned a not null for the correct index.
      */
-    public void _getSelectedAccessibleChild() {
+    public void _getSelectedAccessibleChild() throws Exception {
         executeMethod("getSelectedAccessibleChildCount()");
 
         boolean res = true;
@@ -435,7 +435,7 @@ public class _XAccessibleSelection extends MultiMethodTest {
 
                     if (isSelectable(tEnv.getTestObject(), k)) {
                         oObj.selectAccessibleChild(k);
-                        util.utils.shortWait();
+                        waitForEventIdle();
                         log.println("selected child count: " +
                                     oObj.getSelectedAccessibleChildCount());
                         XAccessible selChild = oObj.getSelectedAccessibleChild(0);
diff --git a/qadevOOo/tests/java/ifc/awt/_XImageProducer.java b/qadevOOo/tests/java/ifc/awt/_XImageProducer.java
index b61bb04..b18253b 100644
--- a/qadevOOo/tests/java/ifc/awt/_XImageProducer.java
+++ b/qadevOOo/tests/java/ifc/awt/_XImageProducer.java
@@ -144,7 +144,7 @@ public class _XImageProducer extends MultiMethodTest {
 
         oObj.startProduction() ;
 
-        util.utils.shortWait();
+        waitForEventIdle();
 
         tRes.tested("startProduction()", consumer.initCalled) ;
     }
diff --git a/qadevOOo/tests/java/ifc/awt/_XItemListener.java b/qadevOOo/tests/java/ifc/awt/_XItemListener.java
index 9e0527b..3751e65 100644
--- a/qadevOOo/tests/java/ifc/awt/_XItemListener.java
+++ b/qadevOOo/tests/java/ifc/awt/_XItemListener.java
@@ -95,7 +95,7 @@ public class _XItemListener extends MultiMethodTest {
         event.Highlighted = 2 ;
         oObj.itemStateChanged(event) ;
 
-        util.utils.pause(200);
+        waitForEventIdle();
 
         result = itemListener.itemStateChangedCalled &&
             itemListener.event.Selected == 1 &&
diff --git a/qadevOOo/tests/java/ifc/awt/_XRadioButton.java b/qadevOOo/tests/java/ifc/awt/_XRadioButton.java
index b190046..a23f83d 100644
--- a/qadevOOo/tests/java/ifc/awt/_XRadioButton.java
+++ b/qadevOOo/tests/java/ifc/awt/_XRadioButton.java
@@ -117,7 +117,7 @@ public class _XRadioButton extends MultiMethodTest {
         boolean result = true ;
         oObj.setState(!state) ;
 
-        util.utils.pause(200);
+        waitForEventIdle();
 
         result = oObj.getState() == !state ;
 
diff --git a/qadevOOo/tests/java/ifc/awt/_XScrollBar.java b/qadevOOo/tests/java/ifc/awt/_XScrollBar.java
index 9c78eec..78b4224 100644
--- a/qadevOOo/tests/java/ifc/awt/_XScrollBar.java
+++ b/qadevOOo/tests/java/ifc/awt/_XScrollBar.java
@@ -36,10 +36,10 @@ public class _XScrollBar extends MultiMethodTest {
     public boolean adjusted = false;
     com.sun.star.awt.XAdjustmentListener listener = new AdjustmentListener();
 
-    public void _addAdjustmentListener() {
+    public void _addAdjustmentListener() throws Exception {
         util.FormTools.switchDesignOf(tParam.getMSF(),
                                  (XTextDocument) tEnv.getObjRelation("Document"));
-        util.utils.shortWait();
+        waitForEventIdle();
         oObj.addAdjustmentListener(listener);
         adjustScrollBar();
 
@@ -167,7 +167,7 @@ public class _XScrollBar extends MultiMethodTest {
 
         sc.setValue(500);
 
-        util.utils.shortWait();
+        waitForEventIdle();
 
         XAccessible acc = UnoRuntime.queryInterface(
                                   XAccessible.class, tEnv.getTestObject());
@@ -186,7 +186,7 @@ public class _XScrollBar extends MultiMethodTest {
             System.out.println("couldn't adjust scrollbar");
         }
 
-        util.utils.shortWait();
+        waitForEventIdle();
     }
 
     public class AdjustmentListener
diff --git a/qadevOOo/tests/java/ifc/awt/_XSpinField.java b/qadevOOo/tests/java/ifc/awt/_XSpinField.java
index d6a9b3a..e30c3207 100644
--- a/qadevOOo/tests/java/ifc/awt/_XSpinField.java
+++ b/qadevOOo/tests/java/ifc/awt/_XSpinField.java
@@ -94,7 +94,7 @@ public class _XSpinField extends MultiMethodTest {
         requiredMethod("addSpinListener()") ;
 
         oObj.up() ;
-        util.utils.shortWait();
+        waitForEventIdle();
 
         tRes.tested("up()", listener.upFl) ;
     }
@@ -108,11 +108,11 @@ public class _XSpinField extends MultiMethodTest {
     *  <li> <code> addSpinListener </code> </li>
     * </ul>
     */
-    public void _down() {
+    public void _down() throws Exception {
         requiredMethod("addSpinListener()") ;
 
         oObj.down() ;
-        util.utils.shortWait();
+        waitForEventIdle();
 
         tRes.tested("down()", listener.downFl) ;
     }
@@ -126,11 +126,11 @@ public class _XSpinField extends MultiMethodTest {
     *  <li> <code> addSpinListener </code> </li>
     * </ul>
     */
-    public void _first() {
+    public void _first() throws Exception {
         requiredMethod("addSpinListener()") ;
 
-        oObj.first() ;
-        util.utils.shortWait();
+        oObj.first();
+        waitForEventIdle();
 
         tRes.tested("first()", listener.firstFl) ;
     }
@@ -144,11 +144,11 @@ public class _XSpinField extends MultiMethodTest {
     *  <li> <code> addSpinListener </code> </li>
     * </ul>
     */
-    public void _last() {
+    public void _last() throws Exception {
         requiredMethod("addSpinListener()") ;
 
-        oObj.last() ;
-        util.utils.shortWait();
+        oObj.last();
+        waitForEventIdle();
 
         tRes.tested("last()", listener.lastFl) ;
     }
diff --git a/qadevOOo/tests/java/ifc/awt/_XSpinValue.java b/qadevOOo/tests/java/ifc/awt/_XSpinValue.java
index ebf5aa7..c3404c0 100644
--- a/qadevOOo/tests/java/ifc/awt/_XSpinValue.java
+++ b/qadevOOo/tests/java/ifc/awt/_XSpinValue.java
@@ -35,10 +35,10 @@ public class _XSpinValue extends MultiMethodTest {
     public boolean adjusted = false;
     com.sun.star.awt.XAdjustmentListener listener = new AdjustmentListener();
 
-    public void _addAdjustmentListener() {
+    public void _addAdjustmentListener() throws Exception {
         util.FormTools.switchDesignOf(tParam.getMSF(),
                                  (XTextDocument) tEnv.getObjRelation("Document"));
-        util.utils.shortWait();
+        waitForEventIdle();
         oObj.addAdjustmentListener(listener);
         adjustScrollBar();
 
@@ -158,7 +158,7 @@ public class _XSpinValue extends MultiMethodTest {
 
         sv.setValue(500);
 
-        util.utils.shortWait();
+        waitForEventIdle();
 
         XAccessible acc = UnoRuntime.queryInterface(
                                   XAccessible.class, tEnv.getTestObject());
@@ -177,7 +177,7 @@ public class _XSpinValue extends MultiMethodTest {
             System.out.println("couldn't adjust scrollbar");
         }
 
-        util.utils.shortWait();
+        waitForEventIdle();
     }
 
     public class AdjustmentListener
diff --git a/qadevOOo/tests/java/ifc/awt/_XTextComponent.java b/qadevOOo/tests/java/ifc/awt/_XTextComponent.java
index c1a73b6..27ea668 100644
--- a/qadevOOo/tests/java/ifc/awt/_XTextComponent.java
+++ b/qadevOOo/tests/java/ifc/awt/_XTextComponent.java
@@ -87,10 +87,10 @@ public class _XTextComponent extends MultiMethodTest {
     * to the object.<p>
     * Has <b> OK </b> status if listener was called.
     */
-    public void _addTextListener(){
+    public void _addTextListener() throws Exception {
         oObj.addTextListener(listener);
         oObj.setText("Listen");
-        util.utils.shortWait();
+        waitForEventIdle();
         if (!textChanged) {
             log.println("Listener wasn't called after changing Text");
         }
diff --git a/qadevOOo/tests/java/ifc/awt/_XTextListener.java b/qadevOOo/tests/java/ifc/awt/_XTextListener.java
index 3a31208..2d57e34 100644
--- a/qadevOOo/tests/java/ifc/awt/_XTextListener.java
+++ b/qadevOOo/tests/java/ifc/awt/_XTextListener.java
@@ -98,7 +98,7 @@ public class _XTextListener extends MultiMethodTest {
         event.dummy1 = 2;
         oObj.textChanged(event);
 
-        util.utils.pause(200);
+        waitForEventIdle();
 
         result = textListener.textChangedCalled &&
             textListener.event.dummy1 == 2;
diff --git a/qadevOOo/tests/java/ifc/awt/_XTopWindow.java b/qadevOOo/tests/java/ifc/awt/_XTopWindow.java
index 22da48a..56f0a5a 100644
--- a/qadevOOo/tests/java/ifc/awt/_XTopWindow.java
+++ b/qadevOOo/tests/java/ifc/awt/_XTopWindow.java
@@ -140,7 +140,7 @@ public class _XTopWindow extends MultiMethodTest {
         requiredMethod("addTopWindowListener()");
         listener.initListener();
         oObj.toFront();
-        util.utils.pause(1000);
+        waitForEventIdle();
 
         tRes.tested("toFront()", listener.activated && !listener.deactivated);
     }
diff --git a/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java b/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java
index 58ccffa..e06959d 100644
--- a/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java
+++ b/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java
@@ -39,7 +39,6 @@ import java.awt.event.InputEvent;
 
 import lib.MultiMethodTest;
 import util.AccessibilityTools;
-import util.utils;
 
 /**
 * Testing <code>com.sun.star.awt.XUserInputInterception</code>
@@ -151,7 +150,7 @@ public class _XUserInputInterception extends MultiMethodTest {
 
         et.run();
 
-        util.utils.pause(utils.DEFAULT_SHORT_WAIT_MS * 2);
+        waitForEventIdle();
         log.println("key listener thread should be finished.");
 
 
@@ -214,7 +213,7 @@ public class _XUserInputInterception extends MultiMethodTest {
 
         et.run();
 
-        util.utils.pause(utils.DEFAULT_SHORT_WAIT_MS * 2);
+        waitForEventIdle();
         log.println("mouse listener thread should be finished.");
 
         boolean bOK = m_mousePressed1 & m_mouseReleased1 &
diff --git a/qadevOOo/tests/java/ifc/awt/_XWindow.java b/qadevOOo/tests/java/ifc/awt/_XWindow.java
index 0b7a406..8ec136b 100644
--- a/qadevOOo/tests/java/ifc/awt/_XWindow.java
+++ b/qadevOOo/tests/java/ifc/awt/_XWindow.java
@@ -242,7 +242,7 @@ public class _XWindow extends MultiMethodTest {
             oObj.setPosSize(0, 0, 100, 100, PosSize.WIDTH);
         }
 
-        util.utils.pause(200);
+        waitForEventIdle();
         boolean res = wListener.resized && wListener.moved &&
             !wListener.hidden && !wListener.shown;
         result &= res;
@@ -257,10 +257,10 @@ public class _XWindow extends MultiMethodTest {
 
         // testing wListener.windowHidden()
         wListener.init();
-        util.utils.pause(200);
+        waitForEventIdle();
         log.println("set object invisible...");
         oObj.setVisible(false);
-        util.utils.pause(200);
+        waitForEventIdle();
         res = wListener.hidden && !wListener.resized
                         && !wListener.moved && !wListener.shown;
         result &= res;
@@ -275,10 +275,10 @@ public class _XWindow extends MultiMethodTest {
 
         // testing wListener.windowShown()
         wListener.init() ;
-        util.utils.pause(200);
+        waitForEventIdle();
         log.println("set object visible...");
         oObj.setVisible(true) ;
-        util.utils.pause(200);
+        waitForEventIdle();
         res = wListener.shown && !wListener.resized &&
                 !wListener.hidden && !wListener.moved;
         result &= res;
@@ -361,9 +361,9 @@ public class _XWindow extends MultiMethodTest {
 
         // testing fListener.lost()
         oObj.setFocus();
-        util.utils.pause(200);
+        waitForEventIdle();
         win.setFocus();
-        util.utils.pause(200);
+        waitForEventIdle();
         result &= fListener.lost;
         if (!fListener.lost) {
             log.println("Lost focus was not notified about") ;
@@ -371,7 +371,7 @@ public class _XWindow extends MultiMethodTest {
 
         // testing fListener.gained()
         oObj.setFocus() ;
-        util.utils.pause(200);
+        waitForEventIdle();
         result &= fListener.gained;
         if (!fListener.gained) {
             log.println("Gained focus was not notified about") ;
diff --git a/qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java
index 50508ce..24c6ab4 100644
--- a/qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java
+++ b/qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java
@@ -197,7 +197,7 @@ public class _XMultiPropertySet extends MultiMethodTest {
                 e.printStackTrace(log);
             } // end of try-catch
         }
-        util.utils.pause(200);
+        waitForEventIdle();
         tRes.tested("addPropertiesChangeListener()", propertiesChanged);
     }
 
@@ -216,7 +216,7 @@ public class _XMultiPropertySet extends MultiMethodTest {
         propertiesChanged = false ;
 
         oObj.firePropertiesChangeEvent(testPropsNames, PClistener);
-        util.utils.pause(200);
+        waitForEventIdle();
 
         tRes.tested("firePropertiesChangeEvent()", propertiesChanged);
     }
diff --git a/qadevOOo/tests/java/ifc/container/_XContainer.java b/qadevOOo/tests/java/ifc/container/_XContainer.java
index 78b8d79..d2302e6 100644
--- a/qadevOOo/tests/java/ifc/container/_XContainer.java
+++ b/qadevOOo/tests/java/ifc/container/_XContainer.java
@@ -254,10 +254,10 @@ public class _XContainer extends MultiMethodTest {
     protected boolean performChanges2() {
         int precount = CC.getControls().length;
         CC.addControl("NewControl",(XControl) inst);
-        util.utils.pause(1000);
+        waitForEventIdle();
         int count = CC.getControls().length;
         CC.removeControl(CC.getControl("NewControl"));
-        util.utils.pause(1000);
+        waitForEventIdle();
         return count>precount;
     }
 
diff --git a/qadevOOo/tests/java/ifc/container/_XIndexAccess.java b/qadevOOo/tests/java/ifc/container/_XIndexAccess.java
index 99e3d60..daafe822 100644
--- a/qadevOOo/tests/java/ifc/container/_XIndexAccess.java
+++ b/qadevOOo/tests/java/ifc/container/_XIndexAccess.java
@@ -75,7 +75,7 @@ public class _XIndexAccess extends MultiMethodTest {
         requiredMethod("getCount()");
         // get count from holder
 
-        util.utils.pause(200);
+        waitForEventIdle();
 
         boolean result = true;
         log.println("Testing getByIndex()");
diff --git a/qadevOOo/tests/java/ifc/document/_XEventBroadcaster.java b/qadevOOo/tests/java/ifc/document/_XEventBroadcaster.java
index 12e54b6..cc30c7e 100644
--- a/qadevOOo/tests/java/ifc/document/_XEventBroadcaster.java
+++ b/qadevOOo/tests/java/ifc/document/_XEventBroadcaster.java
@@ -48,7 +48,7 @@ public class _XEventBroadcaster extends MultiMethodTest {
         XModel docModel = UnoRuntime.queryInterface(
                 XModel.class,tEnv.getTestObject());
         docModel.getCurrentController().getFrame().getContainerWindow().setFocus();
-        util.utils.pause(1000);
+        waitForEventIdle();
         XController xc = UnoRuntime.queryInterface(XController.class,tEnv.getObjRelation("CONT2"));
         xc.getFrame().getContainerWindow().setFocus();
     }
@@ -58,7 +58,7 @@ public class _XEventBroadcaster extends MultiMethodTest {
         listenerCalled = false;
         oObj.addEventListener(listener);
         switchFocus();
-        util.utils.pause(1000);
+        waitForEventIdle();
         tRes.tested("addEventListener()",listenerCalled);
     }
 
@@ -67,7 +67,7 @@ public class _XEventBroadcaster extends MultiMethodTest {
         listenerCalled = false;
         oObj.removeEventListener(listener);
         switchFocus();
-        util.utils.pause(1000);
+        waitForEventIdle();
         tRes.tested("removeEventListener()",!listenerCalled);
     }
 
diff --git a/qadevOOo/tests/java/ifc/form/_XChangeBroadcaster.java b/qadevOOo/tests/java/ifc/form/_XChangeBroadcaster.java
index 5f93420..11c648f 100644
--- a/qadevOOo/tests/java/ifc/form/_XChangeBroadcaster.java
+++ b/qadevOOo/tests/java/ifc/form/_XChangeBroadcaster.java
@@ -124,13 +124,13 @@ public class _XChangeBroadcaster extends MultiMethodTest {
         win1.setFocus();
 
         changeContent() ;
-        util.utils.pause(2000);
+        waitForEventIdle();
 
         win2.setFocus();
         XTextComponent TC = UnoRuntime.queryInterface
             (XTextComponent.class,tEnv.getObjRelation("CONTROL"));
         TC.setText("NOXChangeBroadcaster");
-        util.utils.pause(2000);
+        waitForEventIdle();
         tRes.tested("addChangeListener()", changed);
     }
 
@@ -156,7 +156,7 @@ public class _XChangeBroadcaster extends MultiMethodTest {
         changeContent() ;
 
         win2.setFocus();
-        util.utils.pause(2000);
+        waitForEventIdle();
         tRes.tested("removeChangeListener()", !changed);
     }
 
diff --git a/qadevOOo/tests/java/ifc/form/_XFormController.java b/qadevOOo/tests/java/ifc/form/_XFormController.java
index 7e5c11f..8ae4aa4 100644
--- a/qadevOOo/tests/java/ifc/form/_XFormController.java
+++ b/qadevOOo/tests/java/ifc/form/_XFormController.java
@@ -87,10 +87,10 @@ public class _XFormController extends MultiMethodTest {
 
         XWindow wind = UnoRuntime.queryInterface(XWindow.class, cntrl);
         wind.setFocus();
-        util.utils.pause(1000);
+        waitForEventIdle();
         XWindow otherWind = (XWindow)tEnv.getObjRelation("otherWindow");
         otherWind.setFocus();
-        util.utils.pause(1000);
+        waitForEventIdle();
         log.println("activated = " + listener.activated +
             ", deactivated = " + listener.deactivated) ;
 
@@ -112,10 +112,10 @@ public class _XFormController extends MultiMethodTest {
 
         XWindow wind = UnoRuntime.queryInterface(XWindow.class, cntrl);
         wind.setFocus();
-        util.utils.pause(1000);
+        waitForEventIdle();
         XWindow otherWind = (XWindow)tEnv.getObjRelation("otherWindow");
         otherWind.setFocus();
-        util.utils.pause(1000);
+        waitForEventIdle();
         log.println("activated = " + listener.activated +
             ", deactivated = " + listener.deactivated) ;
 
diff --git a/qadevOOo/tests/java/ifc/form/_XLoadable.java b/qadevOOo/tests/java/ifc/form/_XLoadable.java
index da8f57b..9ef20e4 100644
--- a/qadevOOo/tests/java/ifc/form/_XLoadable.java
+++ b/qadevOOo/tests/java/ifc/form/_XLoadable.java
@@ -117,7 +117,7 @@ public class _XLoadable extends MultiMethodTest {
         boolean result = true ;
         oObj.load() ;
 
-        util.utils.pause(100);
+        waitForEventIdle();
         result = oObj.isLoaded() && loadListener.loadedCalled ;
 
         tRes.tested("load()", result) ;
@@ -142,7 +142,7 @@ public class _XLoadable extends MultiMethodTest {
         boolean result = true ;
         oObj.unload() ;
 
-        util.utils.pause(100);
+        waitForEventIdle();
         result = !oObj.isLoaded() && loadListener.unloadedCalled ;
 
         tRes.tested("unload()", result) ;
@@ -167,7 +167,7 @@ public class _XLoadable extends MultiMethodTest {
         boolean result = true ;
         oObj.reload() ;
 
-        util.utils.pause(100);
+        waitForEventIdle();
         result = oObj.isLoaded() && loadListener.reloadedCalled;
 
         tRes.tested("reload()", result) ;
diff --git a/qadevOOo/tests/java/ifc/form/_XReset.java b/qadevOOo/tests/java/ifc/form/_XReset.java
index 033b9a3..e9835ed 100644
--- a/qadevOOo/tests/java/ifc/form/_XReset.java
+++ b/qadevOOo/tests/java/ifc/form/_XReset.java
@@ -134,11 +134,11 @@ public class _XReset extends MultiMethodTest {
          log.println("Testing reset() ...");
          approve = false;
          oObj.reset();
-         util.utils.shortWait();
+         waitForEventIdle();
          tRes.tested("reset()", (approveReset[0] && (! resetted[0])));
          approve = true;
          oObj.reset();
-         util.utils.shortWait();
+         waitForEventIdle();
          tRes.tested("addResetListener()", (approveReset[1] && resetted[1]));
 
     } // finished _reset
@@ -159,7 +159,7 @@ public class _XReset extends MultiMethodTest {
          approveReset[0] = resetted[0] = false;
          oObj.removeResetListener(listener1);
          oObj.reset();
-         util.utils.shortWait();
+         waitForEventIdle();
          tRes.tested("removeResetListener()", !approveReset[0] && !resetted[0]);
          //removing the second listener here may avoid crashing the office
     } // finished _removeResetListener()
diff --git a/qadevOOo/tests/java/ifc/form/_XSubmit.java b/qadevOOo/tests/java/ifc/form/_XSubmit.java
index bfe3c2b..97b58ff 100644
--- a/qadevOOo/tests/java/ifc/form/_XSubmit.java
+++ b/qadevOOo/tests/java/ifc/form/_XSubmit.java
@@ -134,7 +134,7 @@ public class _XSubmit extends MultiMethodTest {
         }
 
         oObj.submit(cntrl, new MouseEvent());
-        util.utils.pause(200);
+        waitForEventIdle();
 
         log.println("Listener1 called " + listener1.called + " times");
         log.println("Listener2 called " + listener2.called + " times");
diff --git a/qadevOOo/tests/java/ifc/form/_XUpdateBroadcaster.java b/qadevOOo/tests/java/ifc/form/_XUpdateBroadcaster.java
index 34ca218..c482af5 100644
--- a/qadevOOo/tests/java/ifc/form/_XUpdateBroadcaster.java
+++ b/qadevOOo/tests/java/ifc/form/_XUpdateBroadcaster.java
@@ -136,12 +136,12 @@ public class _XUpdateBroadcaster extends MultiMethodTest {
 
         try {
             checker.update() ;
-            util.utils.pause(200);
+            waitForEventIdle();
             checker.commit() ;
-            util.utils.pause(200);
+            waitForEventIdle();
             boolean committed = checker.wasCommited() ;
 
-            util.utils.pause(200);
+            waitForEventIdle();
 
             bResult = listener.approveCalled &&
                       ! listener.updateCalled &&
@@ -152,18 +152,18 @@ public class _XUpdateBroadcaster extends MultiMethodTest {
                 (listener.updateCalled ? "":"NOT")+" called, the value was " +
                 (committed ? "" : "NOT") + " committed.") ;
 
-            util.utils.pause(200);
+            waitForEventIdle();
 
             listener.init() ;
             listener.approve = true ;
-            util.utils.pause(200);
+            waitForEventIdle();
             checker.update() ;
-            util.utils.pause(200);
+            waitForEventIdle();
             checker.commit() ;
-            util.utils.pause(200);
+            waitForEventIdle();
             committed = checker.wasCommited() ;
 
-            util.utils.pause(200);
+            waitForEventIdle();
 
             log.println("Calling with approving : approveUpdate() was " +
                 (listener.approveCalled ? "":"NOT")+" called, updated() was "+
@@ -202,10 +202,10 @@ public class _XUpdateBroadcaster extends MultiMethodTest {
 
         try {
             checker.update() ;
-            util.utils.pause(200);
+            waitForEventIdle();
             checker.commit() ;
 
-            util.utils.pause(200);
+            waitForEventIdle();
 
             bResult = ! listener.approveCalled &&
                       ! listener.updateCalled ;
diff --git a/qadevOOo/tests/java/ifc/form/submission/_XSubmission.java b/qadevOOo/tests/java/ifc/form/submission/_XSubmission.java
index 1943195..14e8a1f 100644
--- a/qadevOOo/tests/java/ifc/form/submission/_XSubmission.java
+++ b/qadevOOo/tests/java/ifc/form/submission/_XSubmission.java
@@ -110,7 +110,7 @@ public class _XSubmission extends MultiMethodTest {
 
         log.println("Sleeping 2s");
 
-        util.utils.pause(2000);
+        waitForEventIdle();
 
         log.println("... done");
 
diff --git a/qadevOOo/tests/java/ifc/frame/_XComponentLoader.java b/qadevOOo/tests/java/ifc/frame/_XComponentLoader.java
index fdcb31f..afda365 100644
--- a/qadevOOo/tests/java/ifc/frame/_XComponentLoader.java
+++ b/qadevOOo/tests/java/ifc/frame/_XComponentLoader.java
@@ -45,7 +45,7 @@ public class _XComponentLoader extends MultiMethodTest {
     * and no exceptions were thrown. <p>
     * @see XComponent
     */
-    public void _loadComponentFromURL() {
+    public void _loadComponentFromURL() throws Exception {
         boolean result = true;
 
         log.println("testing loadComponentFromURL() ... ");
@@ -65,7 +65,7 @@ public class _XComponentLoader extends MultiMethodTest {
             oDoc = oObj.loadComponentFromURL(
                             url, frameName, 0, szArgs);
 
-            util.utils.shortWait();
+            waitForEventIdle();
 
             oDoc.dispose();
 
@@ -74,7 +74,7 @@ public class _XComponentLoader extends MultiMethodTest {
             oDoc = oObj.loadComponentFromURL(
                             url, frameName, 0, szArgs);
 
-            util.utils.shortWait();
+            waitForEventIdle();
 
             oDoc.dispose();
 
diff --git a/qadevOOo/tests/java/ifc/frame/_XDispatch.java b/qadevOOo/tests/java/ifc/frame/_XDispatch.java
index 59dfe64..2fd1270 100644
--- a/qadevOOo/tests/java/ifc/frame/_XDispatch.java
+++ b/qadevOOo/tests/java/ifc/frame/_XDispatch.java
@@ -130,7 +130,7 @@ public class _XDispatch extends MultiMethodTest {
             notificationListener = new TestNotificationListener(log) ;
             xND.dispatchWithNotification(url, arguments, notificationListener);
 
-            util.utils.pause(200);
+            waitForEventIdle();
 
             log.println("   Listener called: "+ notificationListener.finishedDispatch);
 
@@ -171,7 +171,7 @@ public class _XDispatch extends MultiMethodTest {
 
         oObj.dispatch(url, new PropertyValue[0]) ;
 
-        util.utils.pause(200);
+        waitForEventIdle();
 
         log.println("Listener called: "+ listener.statusChangedCalled);
 
@@ -213,7 +213,7 @@ public class _XDispatch extends MultiMethodTest {
 
         oObj.dispatch(url, new PropertyValue[0]) ;
 
-        util.utils.pause(200);
+        waitForEventIdle();
 
         System.out.println("Listener called: "+ listener.statusChangedCalled);
 
diff --git a/qadevOOo/tests/java/ifc/frame/_XDispatchRecorder.java b/qadevOOo/tests/java/ifc/frame/_XDispatchRecorder.java
index f9b9bbe..8a684ed 100644
--- a/qadevOOo/tests/java/ifc/frame/_XDispatchRecorder.java
+++ b/qadevOOo/tests/java/ifc/frame/_XDispatchRecorder.java
@@ -67,7 +67,7 @@ public class _XDispatchRecorder extends MultiMethodTest {
         tRes.tested("startRecording()", true);
     }
 
-    public void _getRecordedMacro() {
+    public void _getRecordedMacro() throws Exception {
 
         clearBuffer();
 
@@ -86,7 +86,7 @@ public class _XDispatchRecorder extends MultiMethodTest {
         XDispatch xDisp = xDispProv.queryDispatch(dispURL, "", 0);
         xDisp.dispatch(dispURL, dispArgs);
 
-        util.utils.shortWait();
+        waitForEventIdle();
 
         log.println("Getting macro ... :");
         String macro = oObj.getRecordedMacro();
diff --git a/qadevOOo/tests/java/ifc/frame/_XDispatchRecorderSupplier.java b/qadevOOo/tests/java/ifc/frame/_XDispatchRecorderSupplier.java
index 938c298..fd6858c 100644
--- a/qadevOOo/tests/java/ifc/frame/_XDispatchRecorderSupplier.java
+++ b/qadevOOo/tests/java/ifc/frame/_XDispatchRecorderSupplier.java
@@ -157,7 +157,7 @@ public class _XDispatchRecorderSupplier extends MultiMethodTest {
      *
      * Has <b>OK</b> status if all cases are OK.
      */
-    public void _dispatchAndRecord() {
+    public void _dispatchAndRecord() throws Exception {
         requiredMethod("getDispatchRecorder()");
 
         boolean res = true;
@@ -173,7 +173,7 @@ public class _XDispatchRecorderSupplier extends MultiMethodTest {
             }
         }
 
-        util.utils.shortWait();
+        waitForEventIdle();
 
         XModel model = UnoRuntime.queryInterface(XModel.class, xTextDoc);
         XFrame fr = model.getCurrentController().getFrame();
diff --git a/qadevOOo/tests/java/ifc/frame/_XFrame.java b/qadevOOo/tests/java/ifc/frame/_XFrame.java
index c24c4fa..6d462eb 100644
--- a/qadevOOo/tests/java/ifc/frame/_XFrame.java
+++ b/qadevOOo/tests/java/ifc/frame/_XFrame.java
@@ -172,10 +172,10 @@ public class _XFrame extends MultiMethodTest {
     /**
     * Test calls the method. Then frame status (activated/deactivated) is
     * changed, and the listener is checked.<p>
-    * Has <b> OK </b> status if isDesktop() method returnes true, or if the
+    * Has <b> OK </b> status if isDesktop() method returns true, or if the
     * listener was called and frame was activated.
     */
-    public void _addFrameActionListener() {
+    public void _addFrameActionListener() throws Exception {
         boolean result = true ;
 
         oObj.addFrameActionListener(listener) ;
@@ -189,8 +189,7 @@ public class _XFrame extends MultiMethodTest {
             return;
         }
 
-        util.utils.shortWait();
-
+        waitForEventIdle();
 
         if (!listenerCalled[0]) {
             log.println("listener was not called.") ;
@@ -399,7 +398,7 @@ public class _XFrame extends MultiMethodTest {
     /**
     * At first new listener is added, then test calls the method and result
     * is checked. <p>
-    * Has <b> OK </b> status if isDesktop() method returnes true or if the
+    * Has <b> OK </b> status if isDesktop() method returns true or if the
     * listener was called and proper event past to listener.
     */
     public void _contextChanged() {
diff --git a/qadevOOo/tests/java/ifc/frame/_XFrameLoader.java b/qadevOOo/tests/java/ifc/frame/_XFrameLoader.java
index 0fb7b9a..ec7a366 100644
--- a/qadevOOo/tests/java/ifc/frame/_XFrameLoader.java
+++ b/qadevOOo/tests/java/ifc/frame/_XFrameLoader.java
@@ -126,7 +126,7 @@ public class _XFrameLoader extends MultiMethodTest {
 
     /**
     * First <code>cancel</code> method test is called.
-    * If in that test loaing process was interrupted by
+    * If in that test loading process was interrupted by
     * <code>cancel</code> call then <code>load</code> test
     * executes. It loads a component, waits some moment to
     * listener have a chance to be called  and then checks
@@ -140,13 +140,13 @@ public class _XFrameLoader extends MultiMethodTest {
     *  <li> <code> cancel() </code> </li>
     * </ul>
     */
-    public void _load() {
+    public void _load() throws Exception {
         executeMethod("cancel()") ;
 
         if (!loaded) {
             oObj.load(frame, url, args, listener) ;
 
-            util.utils.shortWait();
+            waitForEventIdle();
 
             loaded = listener.finished ;
         }
@@ -160,13 +160,13 @@ public class _XFrameLoader extends MultiMethodTest {
     * Has <b>OK</b> status if the process was cancelled or
     * finished (appropriate listener methods were called).
     */
-    public void _cancel() {
+    public void _cancel() throws Exception {
         boolean result = true ;
 
         oObj.load(frame, url, args, listener) ;
         oObj.cancel() ;
 
-        util.utils.shortWait();
+        waitForEventIdle();
 
         if (listener.cancelled) {
             log.println("Loading was canceled.") ;
diff --git a/qadevOOo/tests/java/ifc/frame/_XNotifyingDispatch.java b/qadevOOo/tests/java/ifc/frame/_XNotifyingDispatch.java
index eaf3b55..c5e84d5 100644
--- a/qadevOOo/tests/java/ifc/frame/_XNotifyingDispatch.java
+++ b/qadevOOo/tests/java/ifc/frame/_XNotifyingDispatch.java
@@ -106,7 +106,7 @@ public class _XNotifyingDispatch extends MultiMethodTest {
 
         oObj.dispatchWithNotification(url, arguments, notificationListener);
 
-        util.utils.pause(200);
+        waitForEventIdle();
 
         log.println("Listener called: "+ notificationListener.finishedDispatch);
 
diff --git a/qadevOOo/tests/java/ifc/frame/_XSynchronousFrameLoader.java b/qadevOOo/tests/java/ifc/frame/_XSynchronousFrameLoader.java
index 6b3ed19..a2776ce 100644
--- a/qadevOOo/tests/java/ifc/frame/_XSynchronousFrameLoader.java
+++ b/qadevOOo/tests/java/ifc/frame/_XSynchronousFrameLoader.java
@@ -151,8 +151,7 @@ public class _XSynchronousFrameLoader extends MultiMethodTest {
 
         oObj.cancel() ;
 
-        util.utils.pause(1000);
-
+        waitForEventIdle();
 
         tRes.tested("cancel()", !result[0]) ;
     }
diff --git a/qadevOOo/tests/java/ifc/io/_XActiveDataControl.java b/qadevOOo/tests/java/ifc/io/_XActiveDataControl.java
index ffcd3d6..37383b0 100644
--- a/qadevOOo/tests/java/ifc/io/_XActiveDataControl.java
+++ b/qadevOOo/tests/java/ifc/io/_XActiveDataControl.java
@@ -126,7 +126,7 @@ public class _XActiveDataControl extends MultiMethodTest {
     }
 
     /**
-     * Starts the data activity (e.g. data pump). Verifictation is performed
+     * Starts the data activity (e.g. data pump). Verification is performed
      * later, in <code>_terminate()</code> method.
      */
     public void _start() {
diff --git a/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java b/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java
index 1a6a583..6dec945 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java
@@ -100,7 +100,7 @@ public class _XEnhancedMouseClickBroadcaster extends MultiMethodTest {
             rob.mouseRelease(InputEvent.BUTTON3_MASK);
             System.out.println("done");
             System.out.println("warte");
-            util.utils.pause(200);
+            waitForEventIdle();
             System.out.println("Press Button");
             rob.mousePress(InputEvent.BUTTON1_MASK);
             System.out.println("Release Button");
diff --git a/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java b/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java
index a8767cc..1b29d1e 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java
@@ -62,7 +62,7 @@ public class _XRangeSelection extends MultiMethodTest {
         XWindow xWindow = xModel.getCurrentController().getFrame().getContainerWindow();
         XTopWindow xTopWindow = UnoRuntime.queryInterface(XTopWindow.class, xWindow);
         xTopWindow.toFront();
-        util.utils.pause(500);
+        waitForEventIdle();
     }
 
 
@@ -114,7 +114,7 @@ public class _XRangeSelection extends MultiMethodTest {
         props[2].Value = Boolean.FALSE;
         oObj.startRangeSelection(props);
         // wait for listeners
-        util.utils.pause(1000);
+        waitForEventIdle();
 
         // get closer button: move if window cobvers the sheet center
         Point closer = getCloser(center);
@@ -123,22 +123,22 @@ public class _XRangeSelection extends MultiMethodTest {
 
         // do something to trigger the listeners
         clickOnSheet(center);
-        util.utils.pause(5000);
+        waitForEventIdle();
 
         // click on closer
         clickOnSheet(closer);
-        util.utils.pause(5000);
+        waitForEventIdle();
 
         // open a new range selection
         props[0].Value = "C4:E6";
         oObj.startRangeSelection(props);
-        util.utils.pause(1000);
+        waitForEventIdle();
         props[0].Value = "C2:E3";
         oObj.startRangeSelection(props);
-        util.utils.pause(1000);
+        waitForEventIdle();
 
         oObj.startRangeSelection(props);
-        util.utils.pause(1000);
+        waitForEventIdle();
         oObj.abortRangeSelection();
         aListener.reset();
         System.out.println("Listener called: " + aListener.bAbortCalled);
@@ -295,9 +295,9 @@ public class _XRangeSelection extends MultiMethodTest {
             Robot rob = new Robot();
             rob.mouseMove(point.X, point.Y);
             rob.mousePress(InputEvent.BUTTON1_MASK);
-            util.utils.pause(1000);
+            waitForEventIdle();
             rob.mouseRelease(InputEvent.BUTTON1_MASK);
-            util.utils.pause(1000);
+            waitForEventIdle();
         } catch (java.awt.AWTException e) {
             log.println("couldn't press mouse button");
         }
diff --git a/qadevOOo/tests/java/ifc/system/_XSystemShellExecute.java b/qadevOOo/tests/java/ifc/system/_XSystemShellExecute.java
index 35fc2f1..d141a3c 100644
--- a/qadevOOo/tests/java/ifc/system/_XSystemShellExecute.java
+++ b/qadevOOo/tests/java/ifc/system/_XSystemShellExecute.java
@@ -90,7 +90,7 @@ public class _XSystemShellExecute extends MultiMethodTest {
             } catch(com.sun.star.uno.Exception e) {
                 log.println("Exception:" + e);
             }
-            util.utils.pause(1000);
+            waitForEventIdle();
             i++;
         }
 
diff --git a/qadevOOo/tests/java/ifc/task/_XJobExecutor.java b/qadevOOo/tests/java/ifc/task/_XJobExecutor.java
index d13cf0e..d3910f2 100644
--- a/qadevOOo/tests/java/ifc/task/_XJobExecutor.java
+++ b/qadevOOo/tests/java/ifc/task/_XJobExecutor.java
@@ -57,7 +57,7 @@ public class _XJobExecutor extends MultiMethodTest {
 
         oObj.trigger("TestEvent");
 
-        util.utils.pause(1000);
+        waitForEventIdle();
 
         int after = Integer.parseInt(counter.getName());
 
diff --git a/qadevOOo/tests/java/ifc/text/_XDocumentIndex.java b/qadevOOo/tests/java/ifc/text/_XDocumentIndex.java
index bb843ee..dd74709 100644
--- a/qadevOOo/tests/java/ifc/text/_XDocumentIndex.java
+++ b/qadevOOo/tests/java/ifc/text/_XDocumentIndex.java
@@ -96,7 +96,7 @@ public class _XDocumentIndex extends MultiMethodTest {
 
         oObj.update();
 
-        util.utils.pause(1000);
+        waitForEventIdle();
 
 
         String contentAfter = oObj.getAnchor().getString();
diff --git a/qadevOOo/tests/java/ifc/text/_XMailMergeBroadcaster.java b/qadevOOo/tests/java/ifc/text/_XMailMergeBroadcaster.java
index 003d732..5ac586b 100644
--- a/qadevOOo/tests/java/ifc/text/_XMailMergeBroadcaster.java
+++ b/qadevOOo/tests/java/ifc/text/_XMailMergeBroadcaster.java
@@ -103,8 +103,6 @@ public class _XMailMergeBroadcaster extends MultiMethodTest {
                 ("'could not fire event: " + e)) ;
         }
 
-        util.utils.pause(200);
-
         tRes.tested("addMailMergeEventListener()", changed);
     }
 
@@ -132,7 +130,7 @@ public class _XMailMergeBroadcaster extends MultiMethodTest {
                 ("'could not fire event: " + e)) ;
         }
 
-        util.utils.pause(200);
+        waitForEventIdle();
 
         tRes.tested("removeMailMergeEventListener()", !changed);
     }
diff --git a/qadevOOo/tests/java/ifc/text/_XPagePrintable.java b/qadevOOo/tests/java/ifc/text/_XPagePrintable.java
index 452fe6a..a7239f8 100644
--- a/qadevOOo/tests/java/ifc/text/_XPagePrintable.java
+++ b/qadevOOo/tests/java/ifc/text/_XPagePrintable.java
@@ -108,7 +108,7 @@ public class _XPagePrintable extends MultiMethodTest {
      * Has <b>OK</b> status if the file to which printing must be performed
      * is exists.
      */
-    public void _printPages() {
+    public void _printPages() throws Exception {
         boolean res = true;
 
         try {
@@ -132,7 +132,7 @@ public class _XPagePrintable extends MultiMethodTest {
 
             oObj.printPages(PrintOptions);
 
-            util.utils.shortWait();
+            waitForEventIdle();
 
             if (! util.utils.fileExists(xMSF, printFile)){
                 log.println("ERROR: could not find '" + printFile + "'");
diff --git a/qadevOOo/tests/java/ifc/ui/_XContextMenuInterception.java b/qadevOOo/tests/java/ifc/ui/_XContextMenuInterception.java
index 3935c90..6606527 100644
--- a/qadevOOo/tests/java/ifc/ui/_XContextMenuInterception.java
+++ b/qadevOOo/tests/java/ifc/ui/_XContextMenuInterception.java
@@ -42,7 +42,6 @@ import lib.Status;
 import lib.StatusException;
 import util.AccessibilityTools;
 import util.DesktopTools;
-import util.utils;
 
 public class _XContextMenuInterception extends MultiMethodTest {
 
@@ -68,7 +67,7 @@ public class _XContextMenuInterception extends MultiMethodTest {
         log.println("ensure that the first model is focused");
         DesktopTools.bringWindowToFront(docModel);
 
-        utils.pause(3000);
+        waitForEventIdle();
     }
 
     @Override
@@ -182,7 +181,7 @@ public class _XContextMenuInterception extends MultiMethodTest {
             log.println("couldn't press mouse button");
         }
 
-        utils.pause(1000);
+        waitForEventIdle();
 
     }
 
diff --git a/qadevOOo/tests/java/ifc/ui/dialogs/_XExecutableDialog.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XExecutableDialog.java
index bb10c5a..8665f2f 100644
--- a/qadevOOo/tests/java/ifc/ui/dialogs/_XExecutableDialog.java
+++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XExecutableDialog.java
@@ -73,7 +73,7 @@ public class _XExecutableDialog extends MultiMethodTest {
             eThread.start();
             XCancellable canc = UnoRuntime.queryInterface
                     (XCancellable.class, tEnv.getTestObject());
-            util.utils.pause(2000);
+            waitForEventIdle();
             if (canc != null) {
                 closeDialog();
                 short res = eThread.execRes;
diff --git a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerNotifier.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerNotifier.java
index 603e628..54858bf 100644
--- a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerNotifier.java
+++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerNotifier.java
@@ -134,7 +134,7 @@ public class _XFilePickerNotifier extends MultiMethodTest {
             e.printStackTrace(log) ;
         }
 
-        util.utils.pause(2000);
+        waitForEventIdle();
 
         if (!listener.called) {
             log.println("Listener wasn't called :-(");
@@ -169,7 +169,7 @@ public class _XFilePickerNotifier extends MultiMethodTest {
             e.printStackTrace(log) ;
         }
 
-        util.utils.pause(2000);
+        waitForEventIdle();
 
         closeDialog();
 
diff --git a/qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java b/qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java
index 221cb7c..b60c6f9 100644
--- a/qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java
+++ b/qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java
@@ -53,7 +53,7 @@ public class _XPrintJobBroadcaster extends MultiMethodTest {
     public void _addPrintJobListener() {
         oObj.addPrintJobListener(listenerImpl);
         listenerImpl.fireEvent();
-        util.utils.pause(1000);
+        waitForEventIdle();
         tRes.tested("addPrintJobListener()", listenerImpl.actionTriggered());
     }
 
@@ -64,7 +64,7 @@ public class _XPrintJobBroadcaster extends MultiMethodTest {
         requiredMethod("addPrintJobListener");
         oObj.removePrintJobListener(listenerImpl);
 
-            util.utils.pause(5000);
+        waitForEventIdle();
 
         listenerImpl.reset();
         listenerImpl.fireEvent();
diff --git a/qadevOOo/tests/java/mod/_basctl/AccessibleShape.java b/qadevOOo/tests/java/mod/_basctl/AccessibleShape.java
index 103dca483..8a2bd99 100644
--- a/qadevOOo/tests/java/mod/_basctl/AccessibleShape.java
+++ b/qadevOOo/tests/java/mod/_basctl/AccessibleShape.java
@@ -63,7 +63,7 @@ public class AccessibleShape extends TestCase {
     }
 
     @Override
-    protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) throws Exception {
+    protected TestEnvironment createTestEnvironment(final TestParameters tParam, PrintWriter log) throws Exception {
         XMultiServiceFactory xMSF = tParam.getMSF();
         log.println( "creating a test environment" );
         String aURL=utils.getFullTestURL("basDialog.odt");
@@ -90,7 +90,7 @@ public class AccessibleShape extends TestCase {
         aArgs[3].Value = "Dialog";
         xDPH.executeDispatch(xDPP, ".uno:BasicIDEAppear", "", 0, aArgs);
 
-        utils.pause(3000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         oObj = (XInterface) tParam.getMSF().createInstance
                 ("com.sun.star.awt.Toolkit") ;
@@ -121,7 +121,7 @@ public class AccessibleShape extends TestCase {
                 newPosSize.Y = oldPosSize.Y + 20;
                 basicIDE.setPosSize(newPosSize.X, newPosSize.Y, newPosSize.Width,
                                 newPosSize.Height, PosSize.POSSIZE);
-                utils.pause(1000);
+                util.utils.waitForEventIdle(tParam.getMSF());
                 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 2025e9b..2ec8e6f 100644
--- a/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java
+++ b/qadevOOo/tests/java/mod/_dbaccess/ConnectionLineAccessibility.java
@@ -84,7 +84,7 @@ public class ConnectionLineAccessibility extends TestCase
      * creates two tables in database.
      * Creates a new query and adds it to DefinitionContainer.
      * Opens the QueryComponent.with loadComponentFromURL
-     * and gets the object with the role UNKNOWN and the Impplementation
+     * and gets the object with the role UNKNOWN and the implementation
      * name that contains ConnectionLine
      * @param Param test parameters
      * @param log writer to log information while testing
@@ -161,30 +161,16 @@ public class ConnectionLineAccessibility extends TestCase
         final String col_name1 = "id1";
         final String col_name2 = "id2";
 
-        try
-        {
-            connection = isolConnection.getIsolatedConnection(user, password);
-            statement = connection.createStatement();
-            statement.executeUpdate("drop table if exists " + tbl_name1);
-            statement.executeUpdate("drop table if exists " + tbl_name2);
-            statement.executeUpdate("create table " + tbl_name1 + " (" +
-                    col_name1 + " int)");
-            statement.executeUpdate("create table " + tbl_name2 + " (" +
-                    col_name2 + " int)");
-        }
-        catch (com.sun.star.sdbc.SQLException e)
-        {
-                util.utils.pause(1500);
-                connection = isolConnection.getIsolatedConnection(user,
-                        password);
-                statement = connection.createStatement();
-                statement.executeUpdate("drop table if exists " + tbl_name1);
-                statement.executeUpdate("drop table if exists " + tbl_name2);
-                statement.executeUpdate("create table " + tbl_name1 + " (" +
-                        col_name1 + " int)");
-                statement.executeUpdate("create table " + tbl_name2 + " (" +
-                        col_name2 + " int)");
-        }
+        util.utils.waitForEventIdle(Param.getMSF());
+
+        connection = isolConnection.getIsolatedConnection(user, password);
+        statement = connection.createStatement();
+        statement.executeUpdate("drop table if exists " + tbl_name1);
+        statement.executeUpdate("drop table if exists " + tbl_name2);
+        statement.executeUpdate("create table " + tbl_name1 + " (" +
+                col_name1 + " int)");
+        statement.executeUpdate("create table " + tbl_name2 + " (" +
+                col_name2 + " int)");
 
         XQueryDefinitionsSupplier querySuppl = UnoRuntime.queryInterface(
                 XQueryDefinitionsSupplier.class,
@@ -224,7 +210,7 @@ public class ConnectionLineAccessibility extends TestCase
 
         QueryComponent = DesktopTools.loadDoc(Param.getMSF(),".component:DB/QueryDesign",loadProps);
 
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         xWindow = UnoRuntime.queryInterface(XModel.class, QueryComponent).
             getCurrentController().getFrame().getContainerWindow();
@@ -241,7 +227,7 @@ public class ConnectionLineAccessibility extends TestCase
 
         TestEnvironment tEnv = new TestEnvironment(oObj);
 
-        util.utils.pause(1500);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         final XWindow queryWin = xWindow;
 
diff --git a/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java b/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java
index aef85b4..abddd04 100644
--- a/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java
+++ b/qadevOOo/tests/java/mod/_dbaccess/JoinViewAccessibility.java
@@ -161,29 +161,15 @@ public class JoinViewAccessibility extends TestCase {
         final String col_name1 = "id1";
         final String col_name2 = "id2";
 
-        try
-        {
-            connection = isolConnection.getIsolatedConnection (user, password);
-            statement = connection.createStatement ();
-            statement.executeUpdate ("drop table if exists " + tbl_name1);
-            statement.executeUpdate ("drop table if exists " + tbl_name2);
-            statement.executeUpdate ("create table " + tbl_name1 + " (" +
-            col_name1 + " int)");
-            statement.executeUpdate ("create table " + tbl_name2 + " (" +
-            col_name2 + " int)");
-        } catch (com.sun.star.sdbc.SQLException e)
-        {
-            util.utils.pause(1500);
-            connection = isolConnection.getIsolatedConnection (user,
-            password);
-            statement = connection.createStatement ();
-            statement.executeUpdate ("drop table if exists " + tbl_name1);
-            statement.executeUpdate ("drop table if exists " + tbl_name2);
-            statement.executeUpdate ("create table " + tbl_name1 + " (" +
-            col_name1 + " int)");
-            statement.executeUpdate ("create table " + tbl_name2 + " (" +
-            col_name2 + " int)");
-        }
+        util.utils.waitForEventIdle(Param.getMSF());
+        connection = isolConnection.getIsolatedConnection (user, password);
+        statement = connection.createStatement ();
+        statement.executeUpdate ("drop table if exists " + tbl_name1);
+        statement.executeUpdate ("drop table if exists " + tbl_name2);
+        statement.executeUpdate ("create table " + tbl_name1 + " (" +
+        col_name1 + " int)");
+        statement.executeUpdate ("create table " + tbl_name2 + " (" +
+        col_name2 + " int)");
 
         XQueryDefinitionsSupplier querySuppl = UnoRuntime.queryInterface (
         XQueryDefinitionsSupplier.class,
@@ -238,7 +224,7 @@ public class JoinViewAccessibility extends TestCase {
 
         TestEnvironment tEnv = new TestEnvironment(oObj);
 
-        util.utils.pause(1500);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         final XWindow queryWin = xWindow;
 
diff --git a/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java b/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java
index d0f7d02..4ccff48 100644
--- a/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java
+++ b/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java
@@ -197,7 +197,7 @@ public class ODatasourceBrowser extends TestCase {
         log.println("creating a text document");
         xTextDoc = SOF.createTextDoc(null);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         XModel aModel1 = UnoRuntime.queryInterface(XModel.class,
                                                             xTextDoc);
@@ -250,7 +250,7 @@ public class ODatasourceBrowser extends TestCase {
                                         XInitialization.class, oObj);
         xInit.initialize(params);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         XControlShape aShape = FormTools.createControlShape(xTextDoc, 3000,
                                                             4500, 15000, 10000,
diff --git a/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java b/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java
index 9d186c3..ca4fbcc 100644
--- a/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java
+++ b/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java
@@ -109,7 +109,7 @@ public class OQueryDesign extends TestCase {
         Args[1] = param2;
         getting.dispatch(the_url,Args);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         Object oDBC = xMSF.createInstance( "com.sun.star.sdb.DatabaseContext" );
 
diff --git a/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java b/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java
index d48bd90..b7bcd77 100644
--- a/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java
+++ b/qadevOOo/tests/java/mod/_dbaccess/TableWindowAccessibility.java
@@ -161,26 +161,15 @@ public class TableWindowAccessibility extends TestCase {
         final String col_name1 = "id1";
         final String col_name2 = "id2";
 
-        try {
-            connection = isolConnection.getIsolatedConnection(user, password);
-            statement = connection.createStatement();
-            statement.executeUpdate("drop table if exists " + tbl_name1);
-            statement.executeUpdate("drop table if exists " + tbl_name2);
-            statement.executeUpdate("create table " + tbl_name1 + " ("
-                    + col_name1 + " int)");
-            statement.executeUpdate("create table " + tbl_name2 + " ("
-                    + col_name2 + " int)");
-        } catch (com.sun.star.sdbc.SQLException e) {
-            util.utils.pause(1500);
-            connection = isolConnection.getIsolatedConnection(user, password);
-            statement = connection.createStatement();
-            statement.executeUpdate("drop table if exists " + tbl_name1);
-            statement.executeUpdate("drop table if exists " + tbl_name2);
-            statement.executeUpdate("create table " + tbl_name1 + " ("
-                    + col_name1 + " int)");
-            statement.executeUpdate("create table " + tbl_name2 + " ("
-                    + col_name2 + " int)");
-        }
+        util.utils.waitForEventIdle(Param.getMSF());
+        connection = isolConnection.getIsolatedConnection(user, password);
+        statement = connection.createStatement();
+        statement.executeUpdate("drop table if exists " + tbl_name1);
+        statement.executeUpdate("drop table if exists " + tbl_name2);
+        statement.executeUpdate("create table " + tbl_name1 + " ("
+                + col_name1 + " int)");
+        statement.executeUpdate("create table " + tbl_name2 + " ("
+                + col_name2 + " int)");
 
         XQueryDefinitionsSupplier querySuppl = UnoRuntime.queryInterface(
                 XQueryDefinitionsSupplier.class, oDBSource);
@@ -235,7 +224,7 @@ public class TableWindowAccessibility extends TestCase {
 
         TestEnvironment tEnv = new TestEnvironment(oObj);
 
-        util.utils.pause(1500);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         XAccessibleComponent accComp = UnoRuntime.queryInterface(
                 XAccessibleComponent.class, oObj);
diff --git a/qadevOOo/tests/java/mod/_forms/OTimeControl.java b/qadevOOo/tests/java/mod/_forms/OTimeControl.java
index 7526f4c..40c28b3 100644
--- a/qadevOOo/tests/java/mod/_forms/OTimeControl.java
+++ b/qadevOOo/tests/java/mod/_forms/OTimeControl.java
@@ -225,7 +225,7 @@ public class OTimeControl extends TestCase {
         tEnv.addObjRelation("TestTextListener", listener);
 
         FormTools.switchDesignOf((Param.getMSF()), xTextDoc);
-        util.utils.pause(200);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         return tEnv;
     } // finish method getTestEnvironment
diff --git a/qadevOOo/tests/java/mod/_fwk/DispatchRecorder.java b/qadevOOo/tests/java/mod/_fwk/DispatchRecorder.java
index b8607a1..25c31fd 100644
--- a/qadevOOo/tests/java/mod/_fwk/DispatchRecorder.java
+++ b/qadevOOo/tests/java/mod/_fwk/DispatchRecorder.java
@@ -74,7 +74,7 @@ public class DispatchRecorder extends TestCase {
 
         SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
         oDoc = SOF.createTextDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         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 7cb4ed0..9bd5df7 100644
--- a/qadevOOo/tests/java/mod/_fwk/JobExecutor.java
+++ b/qadevOOo/tests/java/mod/_fwk/JobExecutor.java
@@ -179,7 +179,7 @@ public class JobExecutor extends TestCase {
                 XChangesBatch xCB = UnoRuntime.queryInterface(XChangesBatch.class, oRootCfg);
                 xCB.commitChanges();
 
-                util.utils.pause(1000);
+                util.utils.waitForEventIdle(Param.getMSF());
 
             } catch (com.sun.star.uno.Exception e) {
                 e.printStackTrace(log);
diff --git a/qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_HeaderFooter.java b/qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_HeaderFooter.java
index 3c5cdfa..d9e8fb2 100644
--- a/qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_HeaderFooter.java
+++ b/qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_HeaderFooter.java
@@ -60,12 +60,12 @@ public class AccessibleEditableTextPara_HeaderFooter extends TestCase {
         XExtendedToolkit tk = UnoRuntime.queryInterface(
                                       XExtendedToolkit.class, toolkit);
 
-        util.utils.pause(Param.getInt("ShortWait"));
+        util.utils.waitForEventIdle(Param.getMSF());
 
         DiagThread psDiag = new DiagThread(xCalcDoc, msf);
         psDiag.start();
 
-        util.utils.pause(Param.getInt("ShortWait")*5);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         Object atw = tk.getActiveTopWindow();
 
@@ -74,7 +74,7 @@ public class AccessibleEditableTextPara_HeaderFooter extends TestCase {
 
         XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow);
 
-        util.utils.pause(Param.getInt("ShortWait"));
+        util.utils.waitForEventIdle(Param.getMSF());
 
         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 10acdbc..0e2901f 100644
--- a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvCell.java
+++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvCell.java
@@ -58,8 +58,6 @@ public class ScAccessibleCsvCell extends TestCase {
     @Override
     protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) throws Exception {
 
-        util.utils.pause(2000);
-
         XInterface oObj = (XInterface) tParam.getMSF().createInstance
             ("com.sun.star.awt.Toolkit") ;
 
diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java
index e577bcd..518ce6c 100644
--- a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java
+++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java
@@ -57,8 +57,6 @@ public class ScAccessibleCsvGrid extends TestCase {
     @Override
     protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) throws Exception {
 
-        util.utils.pause(2000);
-
         XInterface oObj = (XInterface) Param.getMSF().createInstance
             ("com.sun.star.awt.Toolkit") ;
 
diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java
index 4576ff8..19307eb 100644
--- a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java
+++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java
@@ -60,8 +60,6 @@ public class ScAccessibleCsvRuler extends TestCase {
     @Override
     protected TestEnvironment createTestEnvironment(TestParameters Param,
                                                     PrintWriter log) throws Exception {
-        util.utils.pause(2000);
-
         XMultiServiceFactory msf = Param.getMSF();
 
         XInterface oObj = (XInterface) msf.createInstance("com.sun.star.awt.Toolkit");
diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleDocument.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleDocument.java
index ea37459..37411116 100644
--- a/qadevOOo/tests/java/mod/_sc/ScAccessibleDocument.java
+++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleDocument.java
@@ -139,7 +139,7 @@ public class ScAccessibleDocument extends TestCase {
             String url = utils.getFullTestURL("calcshapes.sxc");
             log.println("loading document "+url);
             xSpreadsheetDoc = SOF.loadDocument(url);
-            util.utils.pause(500);
+            util.utils.waitForEventIdle(Param.getMSF());
         } 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/ScAccessibleDocumentPagePreview.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java
index 9530e74..30be8cc 100644
--- a/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java
+++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java
@@ -196,7 +196,7 @@ public class ScAccessibleDocumentPagePreview extends TestCase {
             log.println("loading document "+url);
             xSpreadsheetDoc = UnoRuntime.queryInterface(
                             XSpreadsheetDocument.class,SOF.loadDocument(url));
-            util.utils.pause(500);
+            util.utils.waitForEventIdle(Param.getMSF());
         } 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 1fcc985..4102a9d 100644
--- a/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java
+++ b/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java
@@ -126,7 +126,7 @@ public class ScAccessiblePageHeaderArea extends TestCase {
         if(xDispatcher != null)
             xDispatcher.dispatch( aURL, null );
 
-        util.utils.pause(500);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         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 3a260db..b137896 100644
--- a/qadevOOo/tests/java/mod/_sc/ScTabViewObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScTabViewObj.java
@@ -98,7 +98,7 @@ public class ScTabViewObj extends TestCase {
         try {
             log.println("creating two spreadsheet documents");
             xSpreadsheetDoc = SOF.createCalcDoc(null);
-            util.utils.pause(1000);
+            util.utils.waitForEventIdle(Param.getMSF());
             xSpreadsheetDoc2 = SOF.createCalcDoc(null);
         } catch (com.sun.star.uno.Exception e) {
             e.printStackTrace( log );
diff --git a/qadevOOo/tests/java/mod/_sd/AccessibleOutlineView.java b/qadevOOo/tests/java/mod/_sd/AccessibleOutlineView.java
index 886834a..320b76c 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);
-            util.utils.pause(2000);
+            util.utils.waitForEventIdle(Param.getMSF());
         } catch (com.sun.star.uno.Exception e) {
             e.printStackTrace( log );
             throw new StatusException("Couldn't create document", e);
@@ -152,7 +152,7 @@ public class AccessibleOutlineView extends TestCase {
         } catch (com.sun.star.uno.Exception e) {
             log.println("Couldn't change mode");
         }
-        util.utils.pause(2000);
+        util.utils.waitForEventIdle(Param.getMSF());
     }
 }
 
diff --git a/qadevOOo/tests/java/mod/_sd/AccessibleSlideView.java b/qadevOOo/tests/java/mod/_sd/AccessibleSlideView.java
index ccdd916..7f219e9 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);
 
-        util.utils.pause(2000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         XWindow xWindow = AccessibilityTools.getCurrentWindow (
                                 aModel);
@@ -135,7 +135,7 @@ public class AccessibleSlideView extends TestCase {
             throw new StatusException("Couldn't create document", e);
         }
 
-        util.utils.pause(2000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         aModel = UnoRuntime.queryInterface(XModel.class, xImpressDoc);
 
@@ -160,8 +160,7 @@ public class AccessibleSlideView extends TestCase {
             log.println("Couldn't change mode");
         }
 
-        util.utils.pause(2000);
-
+        util.utils.waitForEventIdle(Param.getMSF());
     }
 }
 
diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java b/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java
index 85c6514..9a1fb6d 100644
--- a/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java
+++ b/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java
@@ -136,9 +136,9 @@ public class DrawController_DrawView extends TestCase {
 
         log.println( "creating two impress documents" );
         xDrawDoc = SOF.createDrawDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
         xSecondDrawDoc = SOF.createDrawDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         // get the drawpage of drawing here
         log.println( "getting Drawpage" );
@@ -161,7 +161,7 @@ public class DrawController_DrawView extends TestCase {
         oShapes.add(shape1);
         oShapes.add(shape2);
         oShapes.add(shape3);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         XModel aModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc);
 
@@ -192,7 +192,7 @@ public class DrawController_DrawView extends TestCase {
         xShapes1.add(shape2);
         xShapes1.add(shape3);
         xShapes2.add(shape1);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
 
         tEnv.addObjRelation("Selections", new Object[] {
diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java b/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java
index 7f483a1..0b9fd8c 100644
--- a/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java
+++ b/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java
@@ -154,9 +154,9 @@ public class DrawController_HandoutView extends TestCase {
 
         log.println( "creating two impress documents" );
         xSecondDrawDoc = SOF.createImpressDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
         xDrawDoc = SOF.createImpressDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         // get the drawpage of drawing here
         log.println( "getting Drawpage" );
@@ -182,12 +182,12 @@ public class DrawController_HandoutView extends TestCase {
         oShapes.add(shape1);
         oShapes.add(shape2);
         oShapes.add(shape3);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         log.println("switch to HandoutView...");
         utils.dispatchURL(xMSF, xDrawDoc, ".uno:HandoutMode");
 
-        utils.pause(500);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         XModel aModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc);
 
@@ -220,7 +220,7 @@ public class DrawController_HandoutView extends TestCase {
         xShapes1.add(shape2);
         xShapes1.add(shape3);
         xShapes2.add(shape1);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         tEnv.addObjRelation("Selections", new Object[] {
             oDrawPage, oShapeCol1, oShapeCol2});
diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java b/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java
index 6f2a77e..8f2e56c 100644
--- a/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java
+++ b/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java
@@ -154,9 +154,9 @@ public class DrawController_NotesView extends TestCase {
 
         log.println( "creating two impress documents" );
         xSecondDrawDoc = SOF.createImpressDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
         xDrawDoc = SOF.createImpressDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         // get the drawpage of drawing here
         log.println( "getting Drawpage" );
@@ -179,12 +179,12 @@ public class DrawController_NotesView extends TestCase {
         oShapes.add(shape1);
         oShapes.add(shape2);
         oShapes.add(shape3);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         log.println("switch to HandoutView...");
         utils.dispatchURL(xMSF, xDrawDoc, ".uno:NotesMode");
 
-        utils.pause(500);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         XModel aModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc);
 
@@ -217,7 +217,7 @@ public class DrawController_NotesView extends TestCase {
         xShapes1.add(shape2);
         xShapes1.add(shape3);
         xShapes2.add(shape1);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         tEnv.addObjRelation("Selections", new Object[] {
             oDrawPage, oShapeCol1, oShapeCol2});
diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java b/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java
index fc431e2..38d03e1 100644
--- a/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java
+++ b/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java
@@ -154,9 +154,9 @@ public class DrawController_OutlineView extends TestCase {
 
         log.println( "creating two impress documents" );
         xSecondDrawDoc = SOF.createImpressDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
         xDrawDoc = SOF.createImpressDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         // get the drawpage of drawing here
         log.println( "getting Drawpage" );
@@ -179,12 +179,12 @@ public class DrawController_OutlineView extends TestCase {
         oShapes.add(shape1);
         oShapes.add(shape2);
         oShapes.add(shape3);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         log.println("switch to HandoutView...");
         utils.dispatchURL(xMSF, xDrawDoc, ".uno:OutlineMode");
 
-        utils.pause(500);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         XModel aModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc);
 
@@ -217,7 +217,7 @@ public class DrawController_OutlineView extends TestCase {
         xShapes1.add(shape2);
         xShapes1.add(shape3);
         xShapes2.add(shape1);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         tEnv.addObjRelation("Selections", new Object[] {
             oDrawPage, oShapeCol1, oShapeCol2});
diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java b/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java
index de24493..8f1acd5 100644
--- a/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java
+++ b/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java
@@ -154,9 +154,9 @@ public class DrawController_PresentationView extends TestCase {
 
         log.println( "creating two impress documents" );
         xSecondDrawDoc = SOF.createImpressDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
         xDrawDoc = SOF.createImpressDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         // get the drawpage of drawing here
         log.println( "getting Drawpage" );
@@ -179,12 +179,12 @@ public class DrawController_PresentationView extends TestCase {
         oShapes.add(shape1);
         oShapes.add(shape2);
         oShapes.add(shape3);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         log.println("switch to PresentationView...");
         utils.dispatchURL(xMSF, xDrawDoc, ".uno:DiaMode");
 
-        utils.pause(500);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         XModel aModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc);
 
@@ -217,7 +217,7 @@ public class DrawController_PresentationView extends TestCase {
         xShapes1.add(shape2);
         xShapes1.add(shape3);
         xShapes2.add(shape1);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         tEnv.addObjRelation("Selections", new Object[] {
             oDrawPage, oShapeCol1, oShapeCol2});
diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java b/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java
index c7f7f4d..a0e108b 100644
--- a/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java
+++ b/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java
@@ -151,9 +151,9 @@ public class SdUnoDrawView extends TestCase {
 
         log.println( "creating two draw documents" );
         xDrawDoc = SOF.createDrawDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
         xSecondDrawDoc = SOF.createDrawDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         // get the drawpage of drawing here
         log.println( "getting Drawpage" );
@@ -176,7 +176,7 @@ public class SdUnoDrawView extends TestCase {
         oShapes.add(shape1);
         oShapes.add(shape2);
         oShapes.add(shape3);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         XModel aModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc);
 
diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java b/qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java
index d51c97b..f4fbe3e 100644
--- a/qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java
+++ b/qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java
@@ -135,7 +135,7 @@ public class SdUnoOutlineView extends TestCase {
 
         log.println( "creating a impress document" );
         xImpressDoc = SOF.createImpressDoc(null);
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         XDrawPagesSupplier oDPS = UnoRuntime.queryInterface(XDrawPagesSupplier.class, xImpressDoc);
         XDrawPages the_pages = oDPS.getDrawPages();
@@ -166,7 +166,7 @@ public class SdUnoOutlineView extends TestCase {
 
         log.println( "creating a second impress document" );
         xSecondDrawDoc = SOF.createImpressDoc(null);
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         XModel aModel2 = UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc);
 
diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java b/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java
index e157cd0..91e9923 100644
--- a/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java
+++ b/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java
@@ -150,7 +150,7 @@ public class SdUnoPresView extends TestCase {
         log.println( "creating two impress documents" );
         xImpressDoc = SOF.createImpressDoc(null);
         xSecondDrawDoc = SOF.createImpressDoc(null);
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         // get the drawpage of drawing here
         log.println( "getting Drawpage" );
diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java b/qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java
index ec4a5c6..d4f4b13 100644
--- a/qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java
+++ b/qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java
@@ -108,7 +108,7 @@ public class SdUnoSlideView extends TestCase {
         XDrawPages xDP = null;
         log.println( "creating a impress document" );
         xImpressDoc = SOF.createImpressDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
         xDP = DrawTools.getDrawPages(xImpressDoc);
         xDP.insertNewByIndex(0);
         xDP.insertNewByIndex(0);
@@ -138,7 +138,7 @@ public class SdUnoSlideView extends TestCase {
 
         log.println( "creating a second impress document" );
         xSecondDrawDoc = SOF.createImpressDoc(null);
-        util.utils.pause(1000);
+        util.utils.waitForEventIdle(Param.getMSF());
 
         XModel aModel2 = UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc);
 
diff --git a/qadevOOo/tests/java/mod/_sm/SmEditAccessible.java b/qadevOOo/tests/java/mod/_sm/SmEditAccessible.java
index 8132428..7100277 100644
--- a/qadevOOo/tests/java/mod/_sm/SmEditAccessible.java
+++ b/qadevOOo/tests/java/mod/_sm/SmEditAccessible.java
@@ -66,7 +66,7 @@ public class SmEditAccessible extends TestCase {
      * component with the role <code>AccessibleRole.PANEL</code>.
      */
     @Override
-    protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) throws Exception {
+    protected TestEnvironment createTestEnvironment(final TestParameters Param, PrintWriter log) throws Exception {
 
         SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF() );
         xMathDoc = SOF.openDoc("smath","_blank");
@@ -101,10 +101,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");
-                        util.utils.pause(1000);
+                        util.utils.waitForEventIdle(Param.getMSF());
                         System.out.println("Children "+con.getAccessibleChildCount());
                         xPS.setPropertyValue("Formula", expFormula);
-                        util.utils.pause(1000);
+                        util.utils.waitForEventIdle(Param.getMSF());
                     } catch(com.sun.star.lang.WrappedTargetException e) {
                     } catch(com.sun.star.lang.IllegalArgumentException e) {
                     } catch(com.sun.star.beans.PropertyVetoException e) {
diff --git a/qadevOOo/tests/java/mod/_sm/SmGraphicAccessible.java b/qadevOOo/tests/java/mod/_sm/SmGraphicAccessible.java
index 578e13f..1d02f98 100644
--- a/qadevOOo/tests/java/mod/_sm/SmGraphicAccessible.java
+++ b/qadevOOo/tests/java/mod/_sm/SmGraphicAccessible.java
@@ -68,7 +68,7 @@ public class SmGraphicAccessible extends TestCase {
      * component with the role <code>AccessibleRole.PANEL</code>.
      */
     @Override
-    protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) throws Exception {
+    protected TestEnvironment createTestEnvironment(final TestParameters Param, PrintWriter log) throws Exception {
 
         SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF() );
         xMathDoc = SOF.openDoc("smath","_blank");
@@ -106,9 +106,9 @@ public class SmGraphicAccessible extends TestCase {
                     try {
                         xAC.grabFocus();
                         xPS.setPropertyValue("Formula", "sum hat x");
-                        util.utils.pause(1000);
+                        util.utils.waitForEventIdle(Param.getMSF());
                         xPS.setPropertyValue("Formula", expFormula);
-                        util.utils.pause(1000);
+                        util.utils.waitForEventIdle(Param.getMSF());
                     } catch(com.sun.star.lang.WrappedTargetException e) {
                     } catch(com.sun.star.lang.IllegalArgumentException e) {
                     } catch(com.sun.star.beans.PropertyVetoException e) {
diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java
index 79011eb..09c4f7b 100644
--- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java
+++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java
@@ -95,7 +95,7 @@ public class AccessibleBrowseBox extends TestCase {
         log.println("creating a text document");
         xTextDoc = SOF.createTextDoc(null);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc);
 
@@ -114,7 +114,7 @@ public class AccessibleBrowseBox extends TestCase {
         PropertyValue[] noArgs = new PropertyValue[0];
         getting.dispatch(the_url, noArgs);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XFrame the_frame1 = the_Desk.getCurrentFrame();
 
@@ -141,7 +141,7 @@ public class AccessibleBrowseBox extends TestCase {
 
         final PropertyValue[] fParams = params;
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XWindow xWindow = secondController.getFrame().getContainerWindow();
 
diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java
index d622fc7..222c887 100644
--- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java
+++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java
@@ -126,7 +126,7 @@ public class AccessibleBrowseBoxHeaderBar extends TestCase {
         log.println("creating a text document");
         xTextDoc = SOF.createTextDoc(null);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XModel aModel1 = UnoRuntime.queryInterface(XModel.class,
             xTextDoc);
@@ -165,7 +165,7 @@ public class AccessibleBrowseBoxHeaderBar extends TestCase {
         param3.Value = "biblio";
         params[2] = param3;
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XFrame the_frame1 = the_Desk.getCurrentFrame();
 
@@ -197,14 +197,14 @@ public class AccessibleBrowseBoxHeaderBar extends TestCase {
 
         TestEnvironment tEnv = new TestEnvironment(oObj);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XAccessibleComponent accComp = UnoRuntime.queryInterface(
             XAccessibleComponent.class,
             oObj);
         final Point point = accComp.getLocationOnScreen();
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         tEnv.addObjRelation("EventProducer",
             new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java
index 12d1071..dee44c4 100644
--- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java
+++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderCell.java
@@ -126,7 +126,7 @@ public class AccessibleBrowseBoxHeaderCell extends TestCase {
         log.println( "creating a text document" );
         xTextDoc = SOF.createTextDoc(null);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc);
 
@@ -144,7 +144,7 @@ public class AccessibleBrowseBoxHeaderCell extends TestCase {
         PropertyValue[] noArgs = new PropertyValue[0];
         getting.dispatch(the_url, noArgs);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XFrame the_frame1 = the_Desk.getCurrentFrame();
 
diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTable.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTable.java
index ef5867d..a828487 100644
--- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTable.java
+++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTable.java
@@ -126,7 +126,7 @@ public class AccessibleBrowseBoxTable extends TestCase {
         log.println("creating a text document");
         xTextDoc = SOF.createTextDoc(null);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XModel aModel1 = UnoRuntime.queryInterface(XModel.class,
             xTextDoc);
@@ -148,7 +148,7 @@ public class AccessibleBrowseBoxTable extends TestCase {
         PropertyValue[] noArgs = new PropertyValue[0];
         getting.dispatch(the_url, noArgs);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XFrame the_frame1 = the_Desk.getCurrentFrame();
 
diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java
index 7e3fb29..59b7ba2 100644
--- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java
+++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java
@@ -122,7 +122,7 @@ public class AccessibleBrowseBoxTableCell extends TestCase {
         log.println( "creating a text document" );
         xTextDoc = SOF.createTextDoc(null);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc);
 
@@ -140,7 +140,7 @@ public class AccessibleBrowseBoxTableCell extends TestCase {
         PropertyValue[] noArgs = new PropertyValue[0];
         getting.dispatch(the_url,noArgs);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XFrame the_frame1 = the_Desk.getCurrentFrame();
 
@@ -171,7 +171,7 @@ public class AccessibleBrowseBoxTableCell extends TestCase {
         param3.Value = "biblio";
         params[2] = param3;
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XWindow xWindow = secondController.getFrame().getContainerWindow();
 
diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java
index cb2be82..c1e4542 100644
--- a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java
+++ b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java
@@ -145,7 +145,7 @@ public class AccessibleIconChoiceCtrl extends TestCase {
         log.println("creating a text document");
         xTextDoc = SOF.createTextDoc(null);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XModel aModel1 = UnoRuntime.queryInterface(XModel.class,
                                                             xTextDoc);
@@ -175,7 +175,7 @@ public class AccessibleIconChoiceCtrl extends TestCase {
         PropertyValue[] noArgs = new PropertyValue[0];
         getting.dispatch(url[0], noArgs);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XInterface oObj = (XInterface) tParam.getMSF()
                                       .createInstance("com.sun.star.awt.Toolkit");
@@ -183,7 +183,7 @@ public class AccessibleIconChoiceCtrl extends TestCase {
         XExtendedToolkit tk = UnoRuntime.queryInterface(
                                       XExtendedToolkit.class, oObj);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XWindow xWindow = UnoRuntime.queryInterface(XWindow.class,
                                                               tk.getActiveTopWindow());
diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java
index 8499e80..1c12950 100644
--- a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java
+++ b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java
@@ -149,7 +149,7 @@ public class AccessibleIconChoiceCtrlEntry extends TestCase {
         log.println( "creating a text document" );
         xTextDoc = SOF.createTextDoc(null);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XModel aModel1 = UnoRuntime.queryInterface(XModel.class, xTextDoc);
 
@@ -173,14 +173,14 @@ public class AccessibleIconChoiceCtrlEntry extends TestCase {
         PropertyValue[] noArgs = new PropertyValue[0];
         getting.dispatch(url[0], noArgs);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XInterface oObj = (XInterface) tParam.getMSF().createInstance
                 ("com.sun.star.awt.Toolkit") ;
 
         XExtendedToolkit tk = UnoRuntime.queryInterface(XExtendedToolkit.class, oObj);
 
-        util.utils.pause(5000);
+        util.utils.waitForEventIdle(tParam.getMSF());
 
         XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow());
 
diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java
index d3ee8b3..8e694058 100644
--- a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java
+++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java
@@ -90,12 +90,10 @@ public class AccessibleTabBar extends TestCase {

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list