diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-28 18:29:48 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-18 17:01:39 +0200 |
commit | 9dd436c412372cb2120d3b657de7c4a5c2f6ed89 (patch) | |
tree | cbcfb79c1fb2cb6f15b4645f9ac394b6374b09eb /vcl | |
parent | 6d8076122e39335200017cc16bd92fdd8667460e (diff) |
uitest: initial work on tab page ui testing support
Change-Id: I76fdaad1f84d3b18b130decd7bdb4eef82d341e9
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/uitest/uiobject_impl.hxx | 22 | ||||
-rw-r--r-- | vcl/source/uitest/factory.cxx | 8 | ||||
-rw-r--r-- | vcl/source/uitest/uiobject.cxx | 30 |
3 files changed, 60 insertions, 0 deletions
diff --git a/vcl/inc/uitest/uiobject_impl.hxx b/vcl/inc/uitest/uiobject_impl.hxx index 3efeebef3556..7a5bd04dbc81 100644 --- a/vcl/inc/uitest/uiobject_impl.hxx +++ b/vcl/inc/uitest/uiobject_impl.hxx @@ -13,6 +13,8 @@ #include <vcl/dialog.hxx> #include <vcl/edit.hxx> +class TabPage; + class WindowUIObject : public UIObject { VclPtr<vcl::Window> mxWindow; @@ -117,6 +119,26 @@ protected: virtual OUString get_name() const override; }; +class TabPageUIObject : public WindowUIObject +{ +private: + VclPtr<TabPage> mxTabPage; +public: + TabPageUIObject(VclPtr<TabPage> xTabPage); + + virtual void execute(const OUString& rAction, + const StringMap& rParameters) override; + + virtual StringMap get_state() override; + + + virtual UIObjectType get_type() const override; + +protected: + + virtual OUString get_name() const override; +}; + class ListBoxUIObject : public WindowUIObject { private: diff --git a/vcl/source/uitest/factory.cxx b/vcl/source/uitest/factory.cxx index ef5c4f00abf5..9827c029b476 100644 --- a/vcl/source/uitest/factory.cxx +++ b/vcl/source/uitest/factory.cxx @@ -10,6 +10,7 @@ #include "uitest/factory.hxx" #include "uitest/uiobject_impl.hxx" +#include <vcl/tabpage.hxx> #include <vcl/lstbox.hxx> std::unique_ptr<UIObject> UITestWrapperFactory::createObject(vcl::Window* pWindow) @@ -74,6 +75,13 @@ std::unique_ptr<UIObject> UITestWrapperFactory::createObject(vcl::Window* pWindo return std::unique_ptr<UIObject>(new ListBoxUIObject(pListBox)); } break; + case WINDOW_TABPAGE: + { + //TabPage* pTabPage = dynamic_cast<TabPage*>(pWindow); + //assert(pTabPage); + // return std::unique_ptr<UIObject>(new TabPageUIObject(pTabPage)); + } + break; default: break; } diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index 3082443e5300..b266b7d004c1 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -11,6 +11,7 @@ #include "uitest/factory.hxx" #include <vcl/event.hxx> +#include <vcl/tabpage.hxx> #include <vcl/lstbox.hxx> #include <rtl/ustrbuf.hxx> @@ -425,6 +426,35 @@ OUString CheckBoxUIObject::get_name() const return OUString("CheckBoxUIObject"); } +TabPageUIObject::TabPageUIObject(VclPtr<TabPage> xTabPage): + WindowUIObject(xTabPage), + mxTabPage(xTabPage) +{ +} + +void TabPageUIObject::execute(const OUString& rAction, + const StringMap& rParameters) +{ + +} + +StringMap TabPageUIObject::get_state() +{ + StringMap aMap = WindowUIObject::get_state(); + + return aMap; +} + +UIObjectType TabPageUIObject::get_type() const +{ + return UIObjectType::TABPAGE; +} + +OUString TabPageUIObject::get_name() const +{ + return OUString("TabPageUIObject"); +} + ListBoxUIObject::ListBoxUIObject(VclPtr<ListBox> xListBox): WindowUIObject(xListBox), mxListBox(xListBox) |