diff --git a/tests/auto/widgets/offscreen/test.html b/tests/auto/widgets/offscreen/test.html new file mode 100644 index 0000000000000000000000000000000000000000..55063539f1860139634ab533380097f28ab8ec6d --- /dev/null +++ b/tests/auto/widgets/offscreen/test.html @@ -0,0 +1,7 @@ +<html> +<head><title>TEST</title></head> +<body> +Eat me ! +</body> +</html> + diff --git a/tests/auto/widgets/offscreen/tst_offscreen.cpp b/tests/auto/widgets/offscreen/tst_offscreen.cpp index 98cbe55fe0cd4ac14aec4e6b5d5d1c11cb06c471..7573b0537e8163117ed9699f9083b638489d346e 100644 --- a/tests/auto/widgets/offscreen/tst_offscreen.cpp +++ b/tests/auto/widgets/offscreen/tst_offscreen.cpp @@ -49,10 +49,11 @@ void tst_OffScreen::offscreen() QWebEngineView view; QSignalSpy loadFinishedSpy(&page, SIGNAL(loadFinished(bool))); view.setPage(&page); - page.load(QUrl("http://qt.io")); + page.load(QUrl("qrc:/test.html")); view.show(); QTRY_COMPARE(view.isVisible(), true); QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count() > 0, true, 20000); + QCOMPARE(loadFinishedSpy.takeFirst().at(0).toBool(), true); } #include "tst_offscreen.moc" diff --git a/tests/auto/widgets/offscreen/tst_offscreen.qrc b/tests/auto/widgets/offscreen/tst_offscreen.qrc new file mode 100644 index 0000000000000000000000000000000000000000..8a998fe85abea71550d3a2a3dc7913938fb43529 --- /dev/null +++ b/tests/auto/widgets/offscreen/tst_offscreen.qrc @@ -0,0 +1,6 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource> + <file>test.html</file> +</qresource> +</RCC> + diff --git a/tests/auto/widgets/widgets.pro b/tests/auto/widgets/widgets.pro index 9dba2c070c5d1dcdfac2254b070706f054ea26c3..104c85895d47a9a344ddc2a31897663fc8bb66b4 100644 --- a/tests/auto/widgets/widgets.pro +++ b/tests/auto/widgets/widgets.pro @@ -43,7 +43,6 @@ boot2qt: SUBDIRS -= accessibility defaultsurfaceformat devtools \ qwebenginepage \ qwebengineprofile \ qwebengineview \ - qwebenginescript \ - offscreen + qwebenginescript win32: SUBDIRS -= offscreen