vcl/source/uitest/logger.cxx | 3 +++ vcl/source/window/dialog.cxx | 4 ++++ 2 files changed, 7 insertions(+)
New commits: commit b0026125ab60d98cf6705e5d89e2f87575b5d337 Author: Markus Mohrhard <[email protected]> Date: Tue Mar 21 00:12:23 2017 +0100 uitest: log when we execute a dialog Change-Id: Ibf3e739ce096dd7326325eb2010bf89630993dbd Reviewed-on: https://gerrit.libreoffice.org/35496 Tested-by: Jenkins <[email protected]> Reviewed-by: Markus Mohrhard <[email protected]> diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 15a31bc1c40d..2371d88fe73a 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -50,6 +50,7 @@ #include <vcl/unowrap.hxx> #include <vcl/settings.hxx> #include <vcl/uitest/uiobject.hxx> +#include <vcl/uitest/logger.hxx> #include <salframe.hxx> #include <iostream> @@ -587,6 +588,7 @@ void Dialog::dispose() css::document::DocumentEvent aObject; aObject.EventName = "DialogClosed"; xEventBroadcaster->documentEventOccured(aObject); + UITestLogger::getInstance().log("DialogClosed"); SystemWindow::dispose(); } @@ -701,6 +703,7 @@ void Dialog::StateChanged( StateChangedType nType ) css::document::DocumentEvent aObject; aObject.EventName = "ModelessDialogVisible"; xEventBroadcaster->documentEventOccured(aObject); + UITestLogger::getInstance().log("Modeless Dialog Visible"); } } @@ -904,6 +907,7 @@ short Dialog::Execute() css::document::DocumentEvent aObject; aObject.EventName = "DialogExecute"; xEventBroadcaster->documentEventOccured(aObject); + UITestLogger::getInstance().log("DialogExecute"); // Yield util EndDialog is called or dialog gets destroyed // (the latter should not happen, but better safe than sorry while ( !xWindow->IsDisposed() && mbInExecute ) commit ce786b9115b5f6d158bfa62d8ccca4ddf38a9630 Author: Markus Mohrhard <[email protected]> Date: Tue Mar 21 00:11:33 2017 +0100 uitest: only log actions for elements with the focus Change-Id: Ic480f0d2c5749f3b32a873fc7695394becbebfcc Reviewed-on: https://gerrit.libreoffice.org/35495 Tested-by: Jenkins <[email protected]> Reviewed-by: Markus Mohrhard <[email protected]> diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx index 2549b7dd9a44..f56cc349860b 100644 --- a/vcl/source/uitest/logger.cxx +++ b/vcl/source/uitest/logger.cxx @@ -50,6 +50,9 @@ void UITestLogger::logAction(VclPtr<Control>& xUIElement, VclEventId nEvent) if (xUIElement->get_id().isEmpty()) return; + if (!xUIElement->HasFocus()) + return; + std::unique_ptr<UIObject> pUIObject = xUIElement->GetUITestFactory()(xUIElement.get()); OUString aAction = pUIObject->get_action(nEvent); if (!aAction.isEmpty()) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
