aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-27 09:52:51 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-27 14:40:00 +0200
commite2447f9f5fbe6c8c070ce454bb48c5e45b8c35b3 (patch)
tree5ea8ffde57b47a44577ca79b90daafab52eedd1b /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
parent8018c4b6e7743c576a3548f6e73e588f19f632a9 (diff)
parent7302bc550aa75600c7cdcf5c3d34404e0a09cf67 (diff)
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts: .qmake.conf tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp Change-Id: I715b8a78b74cbe0dcaf599367fd6e08af4858e11
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index def04765a0..eb25eb70f4 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -4203,12 +4203,12 @@ void tst_qqmlecmascript::importScripts()
QFETCH(QVariantList, propertyValues);
TestHTTPServer server;
- QVERIFY2(server.listen(8111), qPrintable(server.errorString()));
+ QVERIFY2(server.listen(), qPrintable(server.errorString()));
server.serveDirectory(dataDirectory() + "/remote");
QStringList importPathList = engine.importPathList();
- QString remotePath(QLatin1String("http://127.0.0.1:8111/"));
+ QString remotePath(server.urlString("/"));
engine.addImportPath(remotePath);
QQmlComponent component(&engine, testfile);
@@ -6055,12 +6055,14 @@ void tst_qqmlecmascript::include()
// Remote - error
{
TestHTTPServer server;
- QVERIFY2(server.listen(8111), qPrintable(server.errorString()));
+ QVERIFY2(server.listen(), qPrintable(server.errorString()));
server.serveDirectory(dataDirectory());
QQmlComponent component(&engine, testFileUrl("include_remote_missing.qml"));
- QObject *o = component.create();
+ QObject *o = component.beginCreate(engine.rootContext());
QVERIFY(o != 0);
+ o->setProperty("serverBaseUrl", server.baseUrl().toString());
+ component.completeCreate();
QTRY_VERIFY(o->property("done").toBool() == true);
@@ -6097,12 +6099,14 @@ void tst_qqmlecmascript::includeRemoteSuccess()
// Remote - success
TestHTTPServer server;
- QVERIFY2(server.listen(8111), qPrintable(server.errorString()));
+ QVERIFY2(server.listen(), qPrintable(server.errorString()));
server.serveDirectory(dataDirectory());
QQmlComponent component(&engine, testFileUrl("include_remote.qml"));
- QObject *o = component.create();
+ QObject *o = component.beginCreate(engine.rootContext());
QVERIFY(o != 0);
+ o->setProperty("serverBaseUrl", server.baseUrl().toString());
+ component.completeCreate();
QTRY_VERIFY(o->property("done").toBool() == true);
QTRY_VERIFY(o->property("done2").toBool() == true);