summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-07-04 13:42:49 +0200
committerMontel Laurent <[email protected]>2016-07-04 13:42:49 +0200
commitd2e6330a60087162374a0ba5e386e9f21fb6929b (patch)
treebbbd1e3eccc142e77992a3209a7d8b5517285d71
parent08d2689e466deccfb0b58abd769ba49fe2554673 (diff)
Add autotest for mailwebenginescript
-rw-r--r--messageviewer/src/CMakeLists.txt1
-rw-r--r--messageviewer/src/viewer/webengine/autotests/CMakeLists.txt12
-rw-r--r--messageviewer/src/viewer/webengine/autotests/mailwebenginescripttest.cpp16
-rw-r--r--messageviewer/src/viewer/webengine/autotests/mailwebenginescripttest.h33
4 files changed, 62 insertions, 0 deletions
diff --git a/messageviewer/src/CMakeLists.txt b/messageviewer/src/CMakeLists.txt
index 86ec229..8f54b90 100644
--- a/messageviewer/src/CMakeLists.txt
+++ b/messageviewer/src/CMakeLists.txt
@@ -37,6 +37,7 @@ if(BUILD_TESTING)
add_subdirectory(viewer/webengine/tests)
add_subdirectory(messageviewerheaderplugins/autotests)
add_subdirectory(messagepartthemes/default/autotests)
+ add_subdirectory(viewer/webengine/autotests/)
endif()
add_subdirectory(pics)
add_subdirectory(kconf_update)
diff --git a/messageviewer/src/viewer/webengine/autotests/CMakeLists.txt b/messageviewer/src/viewer/webengine/autotests/CMakeLists.txt
new file mode 100644
index 0000000..92c2596
--- /dev/null
+++ b/messageviewer/src/viewer/webengine/autotests/CMakeLists.txt
@@ -0,0 +1,12 @@
+
+macro(add_messageviewer_webengine_unittest _source)
+ get_filename_component(_name ${_source} NAME_WE)
+ ecm_add_test(${_source}
+ TEST_NAME ${_name}
+ NAME_PREFIX "messageviewer-"
+ LINK_LIBRARIES KF5::MessageViewer KF5::Libkleo KF5::QGpgme Qt5::Test Qt5::WebKitWidgets KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::AkonadiNotes KF5::CalendarCore
+ )
+endmacro ()
+
+add_messageviewer_webengine_unittest(mailwebenginescripttest.cpp)
+
diff --git a/messageviewer/src/viewer/webengine/autotests/mailwebenginescripttest.cpp b/messageviewer/src/viewer/webengine/autotests/mailwebenginescripttest.cpp
new file mode 100644
index 0000000..dd759f0
--- /dev/null
+++ b/messageviewer/src/viewer/webengine/autotests/mailwebenginescripttest.cpp
@@ -0,0 +1,16 @@
+#include "mailwebenginescripttest.h"
+
+#include <QTest>
+
+MailWebEngineScriptTest::MailWebEngineScriptTest(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
+MailWebEngineScriptTest::~MailWebEngineScriptTest()
+{
+
+}
+
+QTEST_MAIN(MailWebEngineScriptTest)
diff --git a/messageviewer/src/viewer/webengine/autotests/mailwebenginescripttest.h b/messageviewer/src/viewer/webengine/autotests/mailwebenginescripttest.h
new file mode 100644
index 0000000..43c8ec2
--- /dev/null
+++ b/messageviewer/src/viewer/webengine/autotests/mailwebenginescripttest.h
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2016 Laurent Montel <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef MAILWEBENGINESCRIPTTEST_H
+#define MAILWEBENGINESCRIPTTEST_H
+
+#include <QObject>
+
+class MailWebEngineScriptTest : public QObject
+{
+ Q_OBJECT
+public:
+ explicit MailWebEngineScriptTest(QObject *parent = Q_NULLPTR);
+ ~MailWebEngineScriptTest();
+};
+
+#endif // MAILWEBENGINESCRIPTTEST_H