summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2019-04-17 15:32:26 +0200
committerMichal Klocek <michal.klocek@qt.io>2019-04-17 16:07:02 +0000
commit0c54aff9b4cef8a4e66ce1501f207184f3328284 (patch)
treea3dec8de5be1d7817701e76cef95c5f1043c8bf8 /tests
parentee9e7bac7082a1dacdde096da1114372ab98706d (diff)
Make offscreen test offline
This enables also the test on qemu. Change-Id: I70c40b3cedeadfb21e396d8a550a54fe0a319438 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/offscreen/test.html7
-rw-r--r--tests/auto/widgets/offscreen/tst_offscreen.cpp3
-rw-r--r--tests/auto/widgets/offscreen/tst_offscreen.qrc6
-rw-r--r--tests/auto/widgets/widgets.pro3
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