[Libreoffice-commits] core.git: uitest/uitest

Markus Mohrhard markus.mohrhard at googlemail.com
Thu Sep 29 11:43:18 UTC 2016


 uitest/uitest/test.py |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 462048b3502bdb79cb1171cc58d911666bc7d142
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Sep 28 04:03:04 2016 +0200

    fix test failure
    
    Change-Id: Ia963b3930b5d2d0ab612619e0165dadd058b3fda
    Reviewed-on: https://gerrit.libreoffice.org/29372
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py
index c9c51f5..2860c02 100644
--- a/uitest/uitest/test.py
+++ b/uitest/uitest/test.py
@@ -22,10 +22,14 @@ class UITest(object):
     def __init__(self, xUITest, xContext):
         self._xUITest = xUITest
         self._xContext = xContext
+        self._desktop = None
 
     def get_desktop(self):
-        desktop = self._xContext.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", self._xContext)
-        return desktop
+        if self._desktop:
+            return self._desktop
+
+        self._desktop = self._xContext.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", self._xContext)
+        return self._desktop
 
     def get_frames(self):
         desktop = self.get_desktop()


More information about the Libreoffice-commits mailing list