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

Move test in messageviewer directly

parent 7767b099
......@@ -38,7 +38,9 @@ if(BUILD_TESTING)
add_subdirectory(adblock/common/autotests)
add_subdirectory(viewerplugins/tests/)
add_subdirectory(htmlwriter/autotests/)
if (QTWEBENGINE_SUPPORT_OPTION)
add_subdirectory(viewer/webengine/tests)
endif()
endif()
add_subdirectory(pics)
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 @@
#include <QVBoxLayout>
#include <QWebEngineSettings>
#include <webengineviewer/mailwebengineview.h>
#include <MessageViewer/MailWebEngineView>
TestMailWebEngine::TestMailWebEngine(QWidget *parent)
: QWidget(parent)
{
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->settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, true);
vbox->addWidget(mTestWebEngine);
......
......@@ -20,7 +20,7 @@
#include <QWidget>
namespace WebEngineViewer
namespace MessageViewer
{
class MailWebEngineView;
}
......@@ -36,7 +36,7 @@ private Q_SLOTS:
void slotScrollDown();
private:
WebEngineViewer::MailWebEngineView *mTestWebEngine;
MessageViewer::MailWebEngineView *mTestWebEngine;
};
#endif // TESTMAILWEBENGINE_H
......@@ -24,7 +24,7 @@
#include <QVBoxLayout>
#include <QWebEngineSettings>
#include <webengineviewer/mailwebengineview.h>
#include <messageviewer/mailwebengineview.h>
template<typename Arg, typename R, typename C>
struct InvokeWrapper {
......@@ -49,7 +49,7 @@ TestWebEngineScrollAddAttachment::TestWebEngineScrollAddAttachment(QWidget *pare
{
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);
vboxLayout->addWidget(mTestWebEngine);
mTestWebEngine->load(QUrl(QStringLiteral("http://www.kde.org")));
......
......@@ -19,7 +19,7 @@
#define TESTWEBENGINESCROLLADDATTACHMENT_H
#include <QWidget>
namespace WebEngineViewer
namespace MessageViewer
{
class MailWebEngineView;
}
......@@ -32,7 +32,7 @@ public:
private Q_SLOTS:
void slotScrollToAttachment();
private:
WebEngineViewer::MailWebEngineView *mTestWebEngine;
MessageViewer::MailWebEngineView *mTestWebEngine;
};
#endif // TESTWEBENGINESCROLLADDATTACHMENT_H
......@@ -19,40 +19,3 @@ target_link_libraries(webenginescripttest
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