summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-02-24 14:53:32 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-02 09:15:08 +0000
commit0c6312dfba960365771c64b937579a40e02ea5f7 (patch)
treea4628d35b50c63c3c9a2c4835e2a4cde74ced574
parent352115e2aeb8ba8c2bf4897f40b9e26555b7c80c (diff)
Use off-the-record profiles in quick tests
Changes our automated tests to use off-the-record profiles so that we do not create profile directories on disk. Change-Id: Ide1fad7431e2bacd72c469f1c8ebdf473ecf25b6 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
-rw-r--r--tests/auto/quick/inspectorserver/tst_inspectorserver.cpp2
-rw-r--r--tests/auto/quick/qmltests/tst_qmltests.cpp2
-rw-r--r--tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp2
-rw-r--r--tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp1
4 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
index f762e9b5c..e45b4466c 100644
--- a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
+++ b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
@@ -32,6 +32,7 @@
#include <QScopedPointer>
#include <QtQml/QQmlEngine>
#include <QtTest/QtTest>
+#include <QQuickWebEngineProfile>
#include <private/qquickwebengineview_p.h>
#define INSPECTOR_SERVER_PORT "23654"
@@ -62,6 +63,7 @@ tst_InspectorServer::tst_InspectorServer()
{
qputenv("QTWEBENGINE_REMOTE_DEBUGGING", INSPECTOR_SERVER_PORT);
QtWebEngine::initialize();
+ QQuickWebEngineProfile::defaultProfile()->setOffTheRecord(true);
prepareWebViewComponent();
}
diff --git a/tests/auto/quick/qmltests/tst_qmltests.cpp b/tests/auto/quick/qmltests/tst_qmltests.cpp
index fa2f069f5..baffdbb57 100644
--- a/tests/auto/quick/qmltests/tst_qmltests.cpp
+++ b/tests/auto/quick/qmltests/tst_qmltests.cpp
@@ -28,6 +28,7 @@
#include <QtCore/QScopedPointer>
#include <QtQuickTest/quicktest.h>
+#include <QtWebEngine/QQuickWebEngineProfile>
#include "qt_webengine_quicktest.h"
int main(int argc, char **argv)
@@ -42,6 +43,7 @@ int main(int argc, char **argv)
if (!QCoreApplication::instance())
app.reset(new Application(argc, argv));
QtWebEngine::initialize();
+ QQuickWebEngineProfile::defaultProfile()->setOffTheRecord(true);
QTEST_ADD_GPU_BLACKLIST_SUPPORT_DEFS
QTEST_SET_MAIN_SOURCE_PATH
diff --git a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp b/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp
index 9f2060898..3d44efa6a 100644
--- a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp
+++ b/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp
@@ -44,6 +44,7 @@
#include <QtTest/QtTest>
#include <QTimer>
#include <private/qquickwebengineview_p.h>
+#include <QQuickWebEngineProfile>
class tst_QQuickWebEngineDefaultSurfaceFormat : public QObject
{
@@ -68,6 +69,7 @@ private:
void tst_QQuickWebEngineDefaultSurfaceFormat::initEngineAndViewComponent() {
m_engine = new QQmlEngine(this);
+ QQuickWebEngineProfile::defaultProfile()->setOffTheRecord(true);
m_component.reset(new QQmlComponent(m_engine, this));
m_component->setData(QByteArrayLiteral("import QtQuick 2.0\n"
"import QtWebEngine 1.2\n"
diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
index 699c7028b..010e1c457 100644
--- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
+++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
@@ -93,6 +93,7 @@ private:
tst_QQuickWebEngineView::tst_QQuickWebEngineView()
{
QtWebEngine::initialize();
+ QQuickWebEngineProfile::defaultProfile()->setOffTheRecord(true);
m_testSourceDirPath = QString::fromLocal8Bit(TESTS_SOURCE_DIR);
if (!m_testSourceDirPath.endsWith(QLatin1Char('/')))