mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Autotests: Fix CookiesTest
This commit is contained in:
parent
0af95e3b1f
commit
88a2724ad7
@ -14,7 +14,7 @@ endmacro()
|
|||||||
|
|
||||||
falkon_tests(
|
falkon_tests(
|
||||||
qztoolstest
|
qztoolstest
|
||||||
#cookiestest
|
cookiestest
|
||||||
adblocktest
|
adblocktest
|
||||||
updatertest
|
updatertest
|
||||||
)
|
)
|
||||||
|
@ -18,14 +18,13 @@
|
|||||||
#include "cookiestest.h"
|
#include "cookiestest.h"
|
||||||
#include "datapaths.h"
|
#include "datapaths.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
#include "mainapplication.h"
|
||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
|
||||||
void CookiesTest::initTestCase()
|
void CookiesTest::initTestCase()
|
||||||
{
|
{
|
||||||
DataPaths::setCurrentProfilePath(QDir::tempPath() + "qz-test");
|
|
||||||
Settings::createSettings(QDir::tempPath() + "qz-test/settings.ini");
|
|
||||||
m_cookieJar = new CookieJar_Tst;
|
m_cookieJar = new CookieJar_Tst;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,4 +98,11 @@ void CookiesTest::listMatchesDomainTest()
|
|||||||
QCOMPARE(m_cookieJar->listMatchesDomain(list, cookieDomain), result);
|
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);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user