Commit 2a741f7b authored by Laurent Montel's avatar Laurent Montel 😁

Move test in messageviewer directly

parent 7767b099
...@@ -38,7 +38,9 @@ if(BUILD_TESTING) ...@@ -38,7 +38,9 @@ if(BUILD_TESTING)
add_subdirectory(adblock/common/autotests) add_subdirectory(adblock/common/autotests)
add_subdirectory(viewerplugins/tests/) add_subdirectory(viewerplugins/tests/)
add_subdirectory(htmlwriter/autotests/) add_subdirectory(htmlwriter/autotests/)
if (QTWEBENGINE_SUPPORT_OPTION)
add_subdirectory(viewer/webengine/tests)
endif()
endif() endif()
add_subdirectory(pics) add_subdirectory(pics)
add_subdirectory(kconf_update) add_subdirectory(kconf_update)
......
if (NOT MESSAGEVIEWER_USE_QTWEBENGINE)
set(webengineaccesskey_test_SRCS
testwebengineaccesskey.cpp
)
add_executable(webengineaccesskeytest ${webengineaccesskey_test_SRCS})
target_link_libraries(webengineaccesskeytest
Qt5::Widgets KF5::WebEngineViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes KF5::WebKit Qt5::WebKitWidgets
)
endif()
####
set(scrolladdattachment_test_SRCS
testwebenginescrolladdattachment.cpp
)
add_executable(scrolladdattachmenttest ${scrolladdattachment_test_SRCS})
target_link_libraries(scrolladdattachmenttest
Qt5::Widgets KF5::WebEngineViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes KF5::MessageViewer
)
####
set(testmailwebengine_test_SRCS
testmailwebengine.cpp
)
add_executable(testmailwebengine ${testmailwebengine_test_SRCS})
target_link_libraries(testmailwebengine
Qt5::Widgets KF5::WebEngineViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes KF5::MessageViewer
)
...@@ -23,13 +23,13 @@ ...@@ -23,13 +23,13 @@
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QWebEngineSettings> #include <QWebEngineSettings>
#include <webengineviewer/mailwebengineview.h> #include <MessageViewer/MailWebEngineView>
TestMailWebEngine::TestMailWebEngine(QWidget *parent) TestMailWebEngine::TestMailWebEngine(QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
QVBoxLayout *vbox = new QVBoxLayout(this); QVBoxLayout *vbox = new QVBoxLayout(this);
mTestWebEngine = new WebEngineViewer::MailWebEngineView(new KActionCollection(this), this); mTestWebEngine = new MessageViewer::MailWebEngineView(new KActionCollection(this), this);
mTestWebEngine->load(QUrl(QStringLiteral("http://www.kde.org"))); mTestWebEngine->load(QUrl(QStringLiteral("http://www.kde.org")));
mTestWebEngine->settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, true); mTestWebEngine->settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, true);
vbox->addWidget(mTestWebEngine); vbox->addWidget(mTestWebEngine);
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <QWidget> #include <QWidget>
namespace WebEngineViewer namespace MessageViewer
{ {
class MailWebEngineView; class MailWebEngineView;
} }
...@@ -36,7 +36,7 @@ private Q_SLOTS: ...@@ -36,7 +36,7 @@ private Q_SLOTS:
void slotScrollDown(); void slotScrollDown();
private: private:
WebEngineViewer::MailWebEngineView *mTestWebEngine; MessageViewer::MailWebEngineView *mTestWebEngine;
}; };
#endif // TESTMAILWEBENGINE_H #endif // TESTMAILWEBENGINE_H
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QWebEngineSettings> #include <QWebEngineSettings>
#include <webengineviewer/mailwebengineview.h> #include <messageviewer/mailwebengineview.h>
template<typename Arg, typename R, typename C> template<typename Arg, typename R, typename C>
struct InvokeWrapper { struct InvokeWrapper {
...@@ -49,7 +49,7 @@ TestWebEngineScrollAddAttachment::TestWebEngineScrollAddAttachment(QWidget *pare ...@@ -49,7 +49,7 @@ TestWebEngineScrollAddAttachment::TestWebEngineScrollAddAttachment(QWidget *pare
{ {
QVBoxLayout *vboxLayout = new QVBoxLayout(this); QVBoxLayout *vboxLayout = new QVBoxLayout(this);
mTestWebEngine = new WebEngineViewer::MailWebEngineView(new KActionCollection(this), this); mTestWebEngine = new MessageViewer::MailWebEngineView(new KActionCollection(this), this);
mTestWebEngine->settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, true); mTestWebEngine->settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, true);
vboxLayout->addWidget(mTestWebEngine); vboxLayout->addWidget(mTestWebEngine);
mTestWebEngine->load(QUrl(QStringLiteral("http://www.kde.org"))); mTestWebEngine->load(QUrl(QStringLiteral("http://www.kde.org")));
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#define TESTWEBENGINESCROLLADDATTACHMENT_H #define TESTWEBENGINESCROLLADDATTACHMENT_H
#include <QWidget> #include <QWidget>
namespace WebEngineViewer namespace MessageViewer
{ {
class MailWebEngineView; class MailWebEngineView;
} }
...@@ -32,7 +32,7 @@ public: ...@@ -32,7 +32,7 @@ public:
private Q_SLOTS: private Q_SLOTS:
void slotScrollToAttachment(); void slotScrollToAttachment();
private: private:
WebEngineViewer::MailWebEngineView *mTestWebEngine; MessageViewer::MailWebEngineView *mTestWebEngine;
}; };
#endif // TESTWEBENGINESCROLLADDATTACHMENT_H #endif // TESTWEBENGINESCROLLADDATTACHMENT_H
...@@ -19,40 +19,3 @@ target_link_libraries(webenginescripttest ...@@ -19,40 +19,3 @@ target_link_libraries(webenginescripttest
Qt5::Widgets KF5::WebEngineViewer Qt5::WebEngine Qt5::WebEngineWidgets Qt5::Widgets KF5::WebEngineViewer Qt5::WebEngine Qt5::WebEngineWidgets
) )
######
if (NOT MESSAGEVIEWER_USE_QTWEBENGINE)
set(webengineaccesskey_test_SRCS
testwebengineaccesskey.cpp
)
add_executable(webengineaccesskeytest ${webengineaccesskey_test_SRCS})
target_link_libraries(webengineaccesskeytest
Qt5::Widgets KF5::WebEngineViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes KF5::WebKit Qt5::WebKitWidgets
)
endif()
####
#laurent move to messageviewer test
if (0)
set(scrolladdattachment_test_SRCS
testwebenginescrolladdattachment.cpp
)
add_executable(scrolladdattachmenttest ${scrolladdattachment_test_SRCS})
target_link_libraries(scrolladdattachmenttest
Qt5::Widgets KF5::WebEngineViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes
)
####
set(testmailwebengine_test_SRCS
testmailwebengine.cpp
)
add_executable(testmailwebengine ${testmailwebengine_test_SRCS})
target_link_libraries(testmailwebengine
Qt5::Widgets KF5::WebEngineViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes
)
endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment