1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Autotests: Fix CookiesTest

This commit is contained in:
David Rosca 2018-01-27 09:03:18 +01:00
parent 0af95e3b1f
commit 88a2724ad7
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
2 changed files with 10 additions and 4 deletions

View File

@ -14,7 +14,7 @@ endmacro()
falkon_tests(
qztoolstest
#cookiestest
cookiestest
adblocktest
updatertest
)

View File

@ -18,14 +18,13 @@
#include "cookiestest.h"
#include "datapaths.h"
#include "settings.h"
#include "mainapplication.h"
#include <QtTest/QtTest>
#include <QDir>
void CookiesTest::initTestCase()
{
DataPaths::setCurrentProfilePath(QDir::tempPath() + "qz-test");
Settings::createSettings(QDir::tempPath() + "qz-test/settings.ini");
m_cookieJar = new CookieJar_Tst;
}
@ -99,4 +98,11 @@ void CookiesTest::listMatchesDomainTest()
QCOMPARE(m_cookieJar->listMatchesDomain(list, cookieDomain), result);
}
QTEST_MAIN(CookiesTest)
int main(int argc, char **argv)
{
MainApplication::setTestModeEnabled(true);
MainApplication app(argc, argv);
CookiesTest test;
return QTest::qExec(&test, argc, argv);
}