Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Messagelib
Commits
026d6afb
Commit
026d6afb
authored
May 18, 2016
by
Laurent Montel
😁
Browse files
Add more autotests
parent
e82a8a9b
Changes
5
Hide whitespace changes
Inline
Side-by-side
webengineviewer/src/autotests/CMakeLists.txt
View file @
026d6afb
...
...
@@ -18,7 +18,7 @@ ecm_add_test(webengineprintmessageboxtest.cpp
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer
)
ecm_add_test
(
webengineexporthtmlpagejobtest.cpp
ecm_add_test
(
webengineexporthtmlpagejobtest.cpp
../webengineexporthtmlpagejob.cpp
TEST_NAME webengineexporthtmlpagejobtest
NAME_PREFIX
"webengineviewer-"
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer
...
...
webengineviewer/src/autotests/webengineexporthtmlpagejobtest.cpp
View file @
026d6afb
...
...
@@ -16,6 +16,7 @@
*/
#include "webengineexporthtmlpagejobtest.h"
#include "../webengineexporthtmlpagejob.h"
#include <QTest>
WebEngineExportHtmlPageJobTest
::
WebEngineExportHtmlPageJobTest
(
QObject
*
parent
)
...
...
@@ -29,4 +30,10 @@ WebEngineExportHtmlPageJobTest::~WebEngineExportHtmlPageJobTest()
}
void
WebEngineExportHtmlPageJobTest
::
shouldHaveDefaultValue
()
{
WebEngineViewer
::
WebEngineExportHtmlPageJob
job
;
QVERIFY
(
!
job
.
engineView
());
}
QTEST_MAIN
(
WebEngineExportHtmlPageJobTest
)
webengineviewer/src/autotests/webengineexporthtmlpagejobtest.h
View file @
026d6afb
...
...
@@ -26,6 +26,8 @@ class WebEngineExportHtmlPageJobTest : public QObject
public:
explicit
WebEngineExportHtmlPageJobTest
(
QObject
*
parent
=
Q_NULLPTR
);
~
WebEngineExportHtmlPageJobTest
();
private
Q_SLOTS
:
void
shouldHaveDefaultValue
();
};
#endif // WEBENGINEEXPORTHTMLPAGEJOBTEST_H
webengineviewer/src/webengineexporthtmlpagejob.cpp
View file @
026d6afb
...
...
@@ -20,7 +20,8 @@
using
namespace
WebEngineViewer
;
WebEngineExportHtmlPageJob
::
WebEngineExportHtmlPageJob
(
QObject
*
parent
)
:
QObject
(
parent
)
:
QObject
(
parent
),
mEngineView
(
Q_NULLPTR
)
{
}
...
...
@@ -29,3 +30,18 @@ WebEngineExportHtmlPageJob::~WebEngineExportHtmlPageJob()
{
}
void
WebEngineExportHtmlPageJob
::
start
()
{
}
QWebEngineView
*
WebEngineExportHtmlPageJob
::
engineView
()
const
{
return
mEngineView
;
}
void
WebEngineExportHtmlPageJob
::
setEngineView
(
QWebEngineView
*
engineView
)
{
mEngineView
=
engineView
;
}
webengineviewer/src/webengineexporthtmlpagejob.h
View file @
026d6afb
...
...
@@ -19,6 +19,7 @@
#define WEBENGINEEXPORTHTMLPAGEJOB_H
#include <QObject>
class
QWebEngineView
;
namespace
WebEngineViewer
{
class
WebEngineExportHtmlPageJob
:
public
QObject
...
...
@@ -27,6 +28,14 @@ class WebEngineExportHtmlPageJob : public QObject
public:
explicit
WebEngineExportHtmlPageJob
(
QObject
*
parent
=
Q_NULLPTR
);
~
WebEngineExportHtmlPageJob
();
void
start
();
QWebEngineView
*
engineView
()
const
;
void
setEngineView
(
QWebEngineView
*
engineView
);
private:
QWebEngineView
*
mEngineView
;
};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment