diff options
author | Ingrid Halama <iha@openoffice.org> | 2010-06-01 11:40:18 +0200 |
---|---|---|
committer | Ingrid Halama <iha@openoffice.org> | 2010-06-01 11:40:18 +0200 |
commit | ecf9a16e0022c858e3d7adffa25a2b8923f5e691 (patch) | |
tree | 9b4c7ecea8b6c19cd4cc7b15f2be5d9eae7a71d6 /qadevOOo/tests/java | |
parent | 7844f1e00cc847d08783f5eb2089d597fa87ddc8 (diff) | |
parent | e3d773e8b7b3f0dec89c9c6e8b4a563a54b37818 (diff) |
chart47: merge with DEV300_m80
Diffstat (limited to 'qadevOOo/tests/java')
5 files changed, 20 insertions, 19 deletions
diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java index c0668a254195..47b24a337f2c 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java @@ -327,8 +327,7 @@ public class _XAccessibleContext extends MultiMethodTest { } tRes.tested("getLocale()", - (loc != null) && (loc.Language.length() > 0) && - (loc.Country.length() > 0)); + (loc != null) && (loc.Language.length() > 0)); } protected boolean checkStates(String[] expectedStateNames, diff --git a/qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java b/qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java index c4e80ee8a1d7..9c96506938da 100644 --- a/qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java +++ b/qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java @@ -61,48 +61,50 @@ public class _XMessageBoxFactory extends MultiMethodTest { final UITools tools = new UITools( (XMultiServiceFactory) tParam.getMSF(), UnoRuntime.queryInterface(XWindow.class, mb)); - final State[] state = new State[] { State.NONE }; + final boolean[] done = new boolean[] { false }; + final boolean[] good = new boolean[] { false }; XRequestCallback async = AsyncCallback.create( tParam.getComponentContext()); async.addCallback( new XCallback() { public void notify(Object aData) { mb.execute(); + synchronized (done) { + done[0] = true; + done.notifyAll(); + } } }, Any.VOID); async.addCallback( new XCallback() { public void notify(Object aData) { - boolean ok = true; try { tools.clickButton("OK"); } catch (RuntimeException e) { throw e; } catch (Exception e) { - e.printStackTrace(); - ok = false; + throw new RuntimeException(e); } - synchronized (state) { - state[0] = ok ? State.GOOD : State.BAD; - state.notifyAll(); + synchronized (good) { + good[0] = true; } } }, Any.VOID); - boolean ok; - synchronized (state) { - while (state[0] == State.NONE) { + synchronized (done) { + while (!done[0]) { try { - state.wait(); + done.wait(); } catch (InterruptedException e) { throw new RuntimeException(e); } } - ok = state[0] == State.GOOD; + } + boolean ok; + synchronized (good) { + ok = good[0]; } tRes.tested("createMessageBox()", ok); } - - private enum State { NONE, GOOD, BAD }; } diff --git a/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java b/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java index 37311b118d0e..c349d5dcdb28 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java +++ b/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java @@ -293,7 +293,7 @@ public class ORowSet extends TestCase { oldF = utils.getFullURL(origDB); newF = tempFolder + tableName + ".dbf"; } - while ( !utils.overwriteFile( orb, oldF, newF ) ); + while ( !utils.tryOverwriteFile( orb, oldF, newF ) ); m_tableFile = newF; } diff --git a/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java b/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java index fe44c30e7c05..4b360e20fd10 100644 --- a/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java +++ b/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java @@ -311,7 +311,7 @@ public class ODatabaseForm extends TestCase { oldF = utils.getFullURL(origDB); newF = utils.getOfficeTemp((XMultiServiceFactory) tParam.getMSF()) + tableName + ".dbf"; - } while (!utils.overwriteFile(((XMultiServiceFactory) tParam.getMSF()), oldF, newF) && + } while (!utils.tryOverwriteFile(((XMultiServiceFactory) tParam.getMSF()), oldF, newF) && (uniqueSuffix++ < 50)); } } diff --git a/qadevOOo/tests/java/mod/_sfx/StandaloneDocumentInfo.java b/qadevOOo/tests/java/mod/_sfx/StandaloneDocumentInfo.java index 715fdc72d371..81e0d459c0a3 100644 --- a/qadevOOo/tests/java/mod/_sfx/StandaloneDocumentInfo.java +++ b/qadevOOo/tests/java/mod/_sfx/StandaloneDocumentInfo.java @@ -87,7 +87,7 @@ public class StandaloneDocumentInfo extends TestCase { destUrl = utils.getOfficeTemp((XMultiServiceFactory)tParam.getMSF()) + "SfxStandaloneDocInfoObject.sdw"; - utils.overwriteFile((XMultiServiceFactory)tParam.getMSF(), srcUrl, destUrl) ; + utils.doOverwriteFile((XMultiServiceFactory)tParam.getMSF(), srcUrl, destUrl) ; } /** |