You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/08/29 11:46:58 UTC
svn commit: r1518553 -
/openoffice/trunk/test/testuno/source/fvt/uno/sw/DocumentTest.java
Author: hdu
Date: Thu Aug 29 09:46:57 2013
New Revision: 1518553
URL: http://svn.apache.org/r1518553
Log:
#i123139# fix race condition in fvt.uno.sw.DocumentTest's document closing
Modified:
openoffice/trunk/test/testuno/source/fvt/uno/sw/DocumentTest.java
Modified: openoffice/trunk/test/testuno/source/fvt/uno/sw/DocumentTest.java
URL: http://svn.apache.org/viewvc/openoffice/trunk/test/testuno/source/fvt/uno/sw/DocumentTest.java?rev=1518553&r1=1518552&r2=1518553&view=diff
==============================================================================
--- openoffice/trunk/test/testuno/source/fvt/uno/sw/DocumentTest.java (original)
+++ openoffice/trunk/test/testuno/source/fvt/uno/sw/DocumentTest.java Thu Aug 29 09:46:57 2013
@@ -81,8 +81,11 @@ public class DocumentTest {
String title = xTitle.getTitle();
Assert.assertEquals("New Document title start with \"Untitled\"",true, title.startsWith("Untitled"));
unoApp.closeDocument(component);
- XModel xModel = unoApp.getDesktop().getCurrentFrame().getController().getModel();
- Assert.assertTrue("Document has been closed.",xModel==null);
+ XDesktop xDesktop = unoApp.getDesktop();
+ XFrame xFrame = (xDesktop == null) ? null : xDesktop.getCurrentFrame();
+ XController xCtrl = (xFrame == null) ? null : xFrame.getController();
+ XModel xModel = (xCtrl == null) ? null : xCtrl.getModel();
+ Assert.assertTrue("Document has been closed.",xModel==null);
}
/**
* test new document from template