[Libreoffice-commits] core.git: forms/qa qadevOOo/runner qadevOOo/tests
Michael Stahl
mstahl at redhat.com
Mon Jan 16 12:47:00 UTC 2017
forms/qa/integration/forms/DocumentViewHelper.java | 6 ++++++
qadevOOo/runner/util/FormTools.java | 1 +
qadevOOo/tests/java/ifc/awt/_XScrollBar.java | 1 -
qadevOOo/tests/java/ifc/awt/_XSpinValue.java | 1 -
qadevOOo/tests/java/mod/_forms/OTimeControl.java | 1 -
5 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 39ca8c72c2090f557a1bccd241aec88c9bed52fb
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jan 16 13:38:46 2017 +0100
forms,qadevOOo: dispatch of .uno:SwitchControlDesignMode is async
Follow-up to e19cdeaf7ddbcf39da47d9685d8e79e775dde7f4.
Change-Id: Ic4f8f0373199a4237fa30a830fc89a263eb40d62
diff --git a/forms/qa/integration/forms/DocumentViewHelper.java b/forms/qa/integration/forms/DocumentViewHelper.java
index c176247..7acdbce 100644
--- a/forms/qa/integration/forms/DocumentViewHelper.java
+++ b/forms/qa/integration/forms/DocumentViewHelper.java
@@ -22,6 +22,7 @@ package integration.forms;
import com.sun.star.awt.XControl;
import com.sun.star.awt.XControlModel;
import com.sun.star.awt.XWindow;
+import com.sun.star.awt.XToolkitExperimental;
import com.sun.star.beans.PropertyValue;
import com.sun.star.form.XForm;
import com.sun.star.form.runtime.XFormController;
@@ -189,6 +190,11 @@ public class DocumentViewHelper
dispatch( ".uno:SwitchXFormsDesignMode" );
else
dispatch( ".uno:SwitchControlDesignMode" );
+ // at least SwitchControlDesignMode is async, so wait for it to be done
+ XToolkitExperimental xToolkit = UnoRuntime.queryInterface(
+ XToolkitExperimental.class,
+ m_orb.createInstance("com.sun.star.awt.Toolkit"));
+ xToolkit.processEventsToIdle();
}
/* ------------------------------------------------------------------ */
diff --git a/qadevOOo/runner/util/FormTools.java b/qadevOOo/runner/util/FormTools.java
index c89e41b..dd68221 100644
--- a/qadevOOo/runner/util/FormTools.java
+++ b/qadevOOo/runner/util/FormTools.java
@@ -309,6 +309,7 @@ public class FormTools {
com.sun.star.beans.PropertyValue[] noArgs = new com.sun.star.beans.PropertyValue[0];
aDisp.dispatch(aURL, noArgs);
+ util.utils.waitForEventIdle(xMSF); // async dispatch
} catch (Exception e) {
System.out.println("******* Mist");
e.printStackTrace();
diff --git a/qadevOOo/tests/java/ifc/awt/_XScrollBar.java b/qadevOOo/tests/java/ifc/awt/_XScrollBar.java
index 78b4224..8b0e091 100644
--- a/qadevOOo/tests/java/ifc/awt/_XScrollBar.java
+++ b/qadevOOo/tests/java/ifc/awt/_XScrollBar.java
@@ -39,7 +39,6 @@ public class _XScrollBar extends MultiMethodTest {
public void _addAdjustmentListener() throws Exception {
util.FormTools.switchDesignOf(tParam.getMSF(),
(XTextDocument) tEnv.getObjRelation("Document"));
- waitForEventIdle();
oObj.addAdjustmentListener(listener);
adjustScrollBar();
diff --git a/qadevOOo/tests/java/ifc/awt/_XSpinValue.java b/qadevOOo/tests/java/ifc/awt/_XSpinValue.java
index c3404c0..4cf3e19 100644
--- a/qadevOOo/tests/java/ifc/awt/_XSpinValue.java
+++ b/qadevOOo/tests/java/ifc/awt/_XSpinValue.java
@@ -38,7 +38,6 @@ public class _XSpinValue extends MultiMethodTest {
public void _addAdjustmentListener() throws Exception {
util.FormTools.switchDesignOf(tParam.getMSF(),
(XTextDocument) tEnv.getObjRelation("Document"));
- waitForEventIdle();
oObj.addAdjustmentListener(listener);
adjustScrollBar();
diff --git a/qadevOOo/tests/java/mod/_forms/OTimeControl.java b/qadevOOo/tests/java/mod/_forms/OTimeControl.java
index 3751741..01c8f17 100644
--- a/qadevOOo/tests/java/mod/_forms/OTimeControl.java
+++ b/qadevOOo/tests/java/mod/_forms/OTimeControl.java
@@ -218,7 +218,6 @@ public class OTimeControl extends TestCase {
tEnv.addObjRelation("TestTextListener", listener);
FormTools.switchDesignOf(Param.getMSF(), xTextDoc);
- util.utils.waitForEventIdle(Param.getMSF());
return tEnv;
} // finish method getTestEnvironment
More information about the Libreoffice-commits
mailing list