[Libreoffice-commits] core.git: sw/qa

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 8 16:15:26 UTC 2021


 sw/qa/uitest/writer_tests3/hyperlinkdialog.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 12e647fcfe915971515e808ef71a55adbccc73c7
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Mar 30 13:25:40 2021 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Apr 8 18:14:43 2021 +0200

    Make test_tdf141166 work also on macOS (where help is ⌘H, not ^H)
    
    However, without the additional 'FOCUS' action, the test would no longer verify
    the fix for <https://bugs.documentfoundation.org/show_bug.cgi?id=141166>
    "Crash in: mergedlo.dll: Press "Help" button in Hyperlink dialog", namely
    92220638362755f0e776e222fa4e8b79377e75eb "tdf#141166 widget with id 'tabcontrol'
    might not be a TabControl":  At least for a --without-help Linux build, in
    Window::RequestHelp at vcl/source/window/window.cxx:1897,
    
    >     else if (!mpWindowImpl->maHelpRequestHdl.IsSet() || mpWindowImpl->maHelpRequestHdl.Call(*this))
    
    the leading `!mpWindowImpl->maHelpRequestHdl.IsSet()` would be true, so the
    trailing `mpWindowImpl->maHelpRequestHdl.Call(*this)` would not be called and
    would thus not lead to the problematic call of VclBuilder::get<TabControl>.
    
    Change-Id: I35a687834b4eef46b81cc032c2f298ded8490f8b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113347
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sw/qa/uitest/writer_tests3/hyperlinkdialog.py b/sw/qa/uitest/writer_tests3/hyperlinkdialog.py
index 3fc53e712eae..ff1a30931b5a 100644
--- a/sw/qa/uitest/writer_tests3/hyperlinkdialog.py
+++ b/sw/qa/uitest/writer_tests3/hyperlinkdialog.py
@@ -102,10 +102,11 @@ class HyperlinkDialog(UITestCase):
         self.ui_test.execute_dialog_through_command(".uno:HyperlinkDialog")
         xDialog  = self.xUITest.getTopFocusWindow()
         xHelp = xDialog.getChild("help")
+        xHelp.executeAction('FOCUS', tuple())
 
         # Without the fix in place, this test would have crashed here
         self.ui_test.execute_blocking_action(xHelp.executeAction,
-                args=("TYPE", mkPropertyValues({"KEYCODE": "CTRL+h"})), dialog_element="cancel")
+                args=("CLICK", tuple()), dialog_element="cancel")
 
         self.ui_test.close_doc()
 # vim: set shiftwidth=4 softtabstop=4 expandtab:


More information about the Libreoffice-commits mailing list