diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-04-21 11:26:19 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-04-21 17:05:46 +0200 |
commit | 5fb6081475f315ac825f8519fb9c99d751cabd47 (patch) | |
tree | 6763a8e184cff9bba4e9673672b8ac19314100b3 /uitest | |
parent | a8216c210dbe83a7fe0c8b1a767c2ddf8b611e96 (diff) |
uitest: just use .uno:CloseDoc and simplify code
Change-Id: Ic5fec6f1dd76aab6b11e822d127f0eb4c705ffae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114388
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/uitest/test.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py index 6c10d9821016..2cb304c05239 100644 --- a/uitest/uitest/test.py +++ b/uitest/uitest/test.py @@ -72,14 +72,10 @@ class UITest(object): time_ += DEFAULT_SLEEP time.sleep(DEFAULT_SLEEP) - def load_file(self, url, eventName="OnLoad"): - target = "_default" - if eventName == "OnNew": - target = "_blank" - + def load_file(self, url): desktop = self.get_desktop() - with EventListener(self._xContext, eventName) as event: - component = desktop.loadComponentFromURL(url, target, 0, tuple()) + with EventListener(self._xContext, "OnLoad") as event: + component = desktop.loadComponentFromURL(url, "_default", 0, tuple()) time_ = 0 while time_ < MAX_WAIT: if event.executed: @@ -91,10 +87,6 @@ class UITest(object): time_ += DEFAULT_SLEEP time.sleep(DEFAULT_SLEEP) - def load_empty_file(self, app): - url = "private:factory/s" + app - return self.load_file(url, "OnNew") - def execute_dialog_through_command(self, command, printNames=False): with EventListener(self._xContext, "DialogExecute", printNames=printNames) as event: if not self._xUITest.executeDialog(command): |