summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-06-04 21:59:21 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-06-04 23:04:34 +0200
commit5bb06ea6931c0c72df6b0f164bac1c8d00c51bb6 (patch)
treed840c333abbbf32b50b9aa3abc81fccd4388cd03 /vcl
parentfe66c4e2ac43ca0bef04ede7250848dd37c35a45 (diff)
Fix UITest
The test had previously raced between the effect of vnd.sun.star.findbar:FocusToFindbar, typing, and pressing the "Find All" button. If typing happened before focusing, then focusing selected the already typed text. If button was clicked before focusing, it found the edit unfocused, and grabbed the focus, selecting its content. This adds "HasFocus" property to WindowUIObject::get_state. Change-Id: Ib277bd70508a3c1e86e1668afb7592d7a1523947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116697 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/uitest/uiobject.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 6c14c2192177..f04e8c54cc95 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -300,6 +300,7 @@ StringMap WindowUIObject::get_state()
aMap["Visible"] = OUString::boolean(mxWindow->IsVisible());
aMap["ReallyVisible"] = OUString::boolean(mxWindow->IsReallyVisible());
aMap["Enabled"] = OUString::boolean(mxWindow->IsEnabled());
+ aMap["HasFocus"] = OUString::boolean(mxWindow->HasChildPathFocus());
aMap["WindowType"] = OUString::number(static_cast<sal_uInt16>(mxWindow->GetType()), 16);
Point aPos = mxWindow->GetPosPixel();