diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/widgets/offscreen/test.html | 7 | ||||
-rw-r--r-- | tests/auto/widgets/offscreen/tst_offscreen.cpp | 3 | ||||
-rw-r--r-- | tests/auto/widgets/offscreen/tst_offscreen.qrc | 6 | ||||
-rw-r--r-- | tests/auto/widgets/widgets.pro | 3 |
4 files changed, 16 insertions, 3 deletions
diff --git a/tests/auto/widgets/offscreen/test.html b/tests/auto/widgets/offscreen/test.html new file mode 100644 index 000000000..55063539f --- /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 98cbe55fe..7573b0537 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 000000000..8a998fe85 --- /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 9dba2c070..104c85895 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 |