summaryrefslogtreecommitdiff
path: root/include/test
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-12-09 08:04:30 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-18 16:59:48 +0200
commitd5c3f1bf261d98f6d1c0eddcddc4226ad073afb2 (patch)
tree0a8e2d539b1367aef69a54def3518cdc2b2dbf98 /include/test
parentaf5b0086239b2d0e33b4dcc5b7d401a0e1fc6a70 (diff)
uitest: add groundwork for ui testing framework
Change-Id: I51b81da870fd220d56b32c20b9e6c4604912a014
Diffstat (limited to 'include/test')
-rw-r--r--include/test/uiobject.hxx46
-rw-r--r--include/test/uitest.hxx12
2 files changed, 58 insertions, 0 deletions
diff --git a/include/test/uiobject.hxx b/include/test/uiobject.hxx
new file mode 100644
index 000000000000..8f0c04568dce
--- /dev/null
+++ b/include/test/uiobject.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <rtl/ustring.hxx>
+#include <map>
+
+enum class UIObjectType
+{
+ DIALOG,
+ UNKNOWN
+};
+
+/**
+ * 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
+{
+public:
+
+ virtual ~UIObject();
+
+ /**
+ * returns the state of the wrapped UI object
+ */
+ virtual std::map<const OUString, OUString> 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);
+
+ virtual UIObjectType getType();
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/test/uitest.hxx b/include/test/uitest.hxx
new file mode 100644
index 000000000000..b090651ac6a1
--- /dev/null
+++ b/include/test/uitest.hxx
@@ -0,0 +1,12 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */