summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qmltests/tst_qmltests.cpp
diff options
context:
space:
mode:
authorKirill Burtsev <kirill.burtsev@qt.io>2020-07-31 16:02:36 +0200
committerKirill Burtsev <kirill.burtsev@qt.io>2020-08-31 10:05:07 +0200
commitd25075fb681fa92fad1f9bdcb262a3e361e7659e (patch)
treef68a40335197e0966bd850a4a8d2722922baa914 /tests/auto/quick/qmltests/tst_qmltests.cpp
parent5f1f7e8913b74f9a88864b4155db8753007db52c (diff)
Don't send duplicate load progress values
Suppress duplicated progress values coming from chromium. Verify this behavior reliably (and not only 0 and 100 value) by loading html with subresources with minor delay through test http server. Change-Id: Id034dda9012212d54d12fc95d5939ba301577c1c Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'tests/auto/quick/qmltests/tst_qmltests.cpp')
-rw-r--r--tests/auto/quick/qmltests/tst_qmltests.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/quick/qmltests/tst_qmltests.cpp b/tests/auto/quick/qmltests/tst_qmltests.cpp
index 819f0b07c..5677f9047 100644
--- a/tests/auto/quick/qmltests/tst_qmltests.cpp
+++ b/tests/auto/quick/qmltests/tst_qmltests.cpp
@@ -26,6 +26,8 @@
**
****************************************************************************/
+#include <httpserver.h>
+
#include <QtCore/QScopedPointer>
#include <QTemporaryDir>
#include <QtQuickTest/quicktest.h>
@@ -143,6 +145,12 @@ int main(int argc, char **argv)
qmlRegisterType<TempDir>("Test.util", 1, 0, "TempDir");
QTEST_SET_MAIN_SOURCE_PATH
+ qmlRegisterSingletonType<HttpServer>("Test.Shared", 1, 0, "HttpServer", [&] (QQmlEngine *, QJSEngine *) {
+ auto server = new HttpServer;
+ server->setResourceDirs({ TESTS_SHARED_DATA_DIR, QUICK_TEST_SOURCE_DIR });
+ return server;
+ });
+
int i = quick_test_main(argc, argv, "qmltests", QUICK_TEST_SOURCE_DIR);
return i;
}