Commit 0c54aff9 authored by Michal Klocek's avatar Michal Klocek
Browse files

Make offscreen test offline


This enables also the test on qemu.

Change-Id: I70c40b3cedeadfb21e396d8a550a54fe0a319438
Reviewed-by: default avatarMichael Brüning <michael.bruning@qt.io>
Showing with 16 additions and 3 deletions
<html>
<head><title>TEST</title></head>
<body>
Eat me !
</body>
</html>
...@@ -49,10 +49,11 @@ void tst_OffScreen::offscreen() ...@@ -49,10 +49,11 @@ void tst_OffScreen::offscreen()
QWebEngineView view; QWebEngineView view;
QSignalSpy loadFinishedSpy(&page, SIGNAL(loadFinished(bool))); QSignalSpy loadFinishedSpy(&page, SIGNAL(loadFinished(bool)));
view.setPage(&page); view.setPage(&page);
page.load(QUrl("http://qt.io")); page.load(QUrl("qrc:/test.html"));
view.show(); view.show();
QTRY_COMPARE(view.isVisible(), true); QTRY_COMPARE(view.isVisible(), true);
QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count() > 0, true, 20000); QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count() > 0, true, 20000);
QCOMPARE(loadFinishedSpy.takeFirst().at(0).toBool(), true);
} }
#include "tst_offscreen.moc" #include "tst_offscreen.moc"
......
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>test.html</file>
</qresource>
</RCC>
...@@ -43,7 +43,6 @@ boot2qt: SUBDIRS -= accessibility defaultsurfaceformat devtools \ ...@@ -43,7 +43,6 @@ boot2qt: SUBDIRS -= accessibility defaultsurfaceformat devtools \
qwebenginepage \ qwebenginepage \
qwebengineprofile \ qwebengineprofile \
qwebengineview \ qwebengineview \
qwebenginescript \ qwebenginescript
offscreen
win32: SUBDIRS -= offscreen win32: SUBDIRS -= offscreen
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment