diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-01-06 21:39:52 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-18 16:59:48 +0200 |
commit | dde9b4d86f75159f0d591f22aa10a7d4571aa441 (patch) | |
tree | 5999af41ee652c85c7b6cc99fbcf43c61f6af771 /include | |
parent | d5c3f1bf261d98f6d1c0eddcddc4226ad073afb2 (diff) |
uitest: some more work for the UI testing
Change-Id: I79193190f8f614b2d6a71032f05a0518eb9d1a1d
Diffstat (limited to 'include')
-rw-r--r-- | include/test/testdllapi.hxx | 6 | ||||
-rw-r--r-- | include/test/uiobject.hxx | 35 | ||||
-rw-r--r-- | include/test/uitest.hxx | 6 |
3 files changed, 43 insertions, 4 deletions
diff --git a/include/test/testdllapi.hxx b/include/test/testdllapi.hxx index 3e33b0b51ec0..b7af82c72e4e 100644 --- a/include/test/testdllapi.hxx +++ b/include/test/testdllapi.hxx @@ -28,6 +28,12 @@ #define OOO_DLLPUBLIC_TEST SAL_DLLPUBLIC_IMPORT #endif +#if defined DLLIMPLEMENTATION_UITEST +#define UITEST_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define UITEST_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/uiobject.hxx b/include/test/uiobject.hxx index 8f0c04568dce..c33bd4380790 100644 --- a/include/test/uiobject.hxx +++ b/include/test/uiobject.hxx @@ -9,20 +9,27 @@ #include <rtl/ustring.hxx> #include <map> +#include <memory> + +#include <vcl/window.hxx> +#include <test/testdllapi.hxx> enum class UIObjectType { + WINDOW, DIALOG, UNKNOWN }; +typedef std::map<const OUString, OUString> StringMap; + /** * This class wraps a UI object like vcl::Window and provides * an interface for the UI testing. * * This class should only have virtual methods. */ -class UIObject +class UITEST_DLLPUBLIC UIObject { public: @@ -31,16 +38,36 @@ public: /** * returns the state of the wrapped UI object */ - virtual std::map<const OUString, OUString> get_state(); + virtual StringMap get_state(); /** * executes an action on the wrapped UI object, * possibly with some additional parameters */ virtual void execute(const OUString& rAction, - const std::map<const OUString, OUString>& rParameters); + const StringMap& rParameters); + + virtual UIObjectType getType() const; + + virtual std::unique_ptr<UIObject> get_child(const OUString& rID); +}; + +class WindowUIObject : public UIObject +{ + VclPtr<vcl::Window> mxWindow; + +public: + + WindowUIObject(VclPtr<vcl::Window> xWindow); + + virtual StringMap get_state() override; + + virtual void execute(const OUString& rAction, + const StringMap& rParameters) override; + + virtual UIObjectType getType() const override; - virtual UIObjectType getType(); + virtual std::unique_ptr<UIObject> get_child(const OUString& rID); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/uitest.hxx b/include/test/uitest.hxx index b090651ac6a1..2fb08f5ff6a2 100644 --- a/include/test/uitest.hxx +++ b/include/test/uitest.hxx @@ -7,6 +7,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <test/testdllapi.hxx> + +class UITEST_DLLPUBLIC UITest +{ +public: +}; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |