// Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "qtwebenginequickglobal.h" #include #include #include #include #include class tst_qtbug_70248: public QObject { Q_OBJECT public: static void initMain(); private slots: void test(); }; void tst_qtbug_70248::initMain() { QtWebEngineQuick::initialize(); } void tst_qtbug_70248::test() { QScopedPointer engine; QQuickWebEngineProfile::defaultProfile()->setOffTheRecord(true); engine.reset(new QQmlApplicationEngine()); engine->load(QUrl(QStringLiteral("qrc:/test.qml"))); QQuickWindow *widnow = qobject_cast(engine->rootObjects().first()); QVERIFY(widnow); } #include "tst_qtbug-70248.moc" QTEST_MAIN(tst_qtbug_70248)