From: Simon Hausmann Date: Tue, 28 Apr 2015 08:57:34 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/5.5' into dev X-Git-Tag: v5.5.90+alpha1~328^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94db5de2acefb6e96d4f6cfda2df14905a5e63c5;p=platform%2Fupstream%2Fqtdeclarative.git Merge remote-tracking branch 'origin/5.5' into dev Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I075e742da8396a268d97d3ab34bcd9e0c0cf001f --- 94db5de2acefb6e96d4f6cfda2df14905a5e63c5 diff --cc tests/auto/qml/qqmlxmlhttprequest/data/receive_json_data.expect index 59a7806bc,000000000..97b016f50 mode 100644,000000..100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/receive_json_data.expect +++ b/tests/auto/qml/qqmlxmlhttprequest/data/receive_json_data.expect @@@ -1,7 -1,0 +1,7 @@@ +GET /json.data HTTP/1.1 +Accept-Language: en-US,* +Content-Type: application/jsonrequest +Connection: Keep-Alive +Accept-Encoding: gzip, deflate +User-Agent: Mozilla/5.0 - Host: 127.0.0.1:14445 ++Host: {{ServerHostUrl}} diff --cc tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp index d901c4dd1,c159dc842..ad78fafc6 --- a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp +++ b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp @@@ -836,23 -848,6 +849,23 @@@ void tst_qqmlxmlhttprequest::getBinaryD QTRY_VERIFY(object->property("readSize").toInt() == fileInfo.size()); } +void tst_qqmlxmlhttprequest::getJsonData() +{ + TestHTTPServer server; - QVERIFY2(server.listen(SERVER_PORT), qPrintable(server.errorString())); ++ QVERIFY2(server.listen(), qPrintable(server.errorString())); + QVERIFY(server.wait(testFileUrl("receive_json_data.expect"), + testFileUrl("receive_binary_data.reply"), + testFileUrl("json.data"))); + + QQmlComponent component(&engine, testFileUrl("receiveJsonData.qml")); + QScopedPointer object(component.beginCreate(engine.rootContext())); + QVERIFY(!object.isNull()); - object->setProperty("url", "http://127.0.0.1:14445/json.data"); ++ object->setProperty("url", server.urlString("/json.data")); + component.completeCreate(); + + QTRY_VERIFY(object->property("result").toBool()); +} + void tst_qqmlxmlhttprequest::status() { QFETCH(QUrl, replyUrl); diff --cc tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp index 9ba773cfe,efe2ca8b1..2a96bd150 --- a/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp +++ b/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp @@@ -135,17 -132,12 +132,19 @@@ void tst_qquickborderimage::imageSource QFETCH(bool, remote); QFETCH(QString, error); +#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID) + if (qstrcmp(QTest::currentDataTag(), "remote") == 0 + || qstrcmp(QTest::currentDataTag(), "remote not found") == 0) { + QSKIP("Remote tests cause occasional hangs in the CI system -- QTBUG-45655"); + } +#endif + TestHTTPServer server; if (remote) { - QVERIFY2(server.listen(SERVER_PORT), qPrintable(server.errorString())); + QVERIFY2(server.listen(), qPrintable(server.errorString())); server.serveDirectory(dataDirectory()); + source = server.urlString(source); + error.replace(QStringLiteral("{{ServerBaseUrl}}"), server.baseUrl().toString()); } if (!error.isEmpty()) diff --cc tests/auto/quick/qquickimage/tst_qquickimage.cpp index b8ab60ff6,ce8b52222..91ef92114 --- a/tests/auto/quick/qquickimage/tst_qquickimage.cpp +++ b/tests/auto/quick/qquickimage/tst_qquickimage.cpp @@@ -171,23 -168,13 +168,25 @@@ void tst_qquickimage::imageSource( QFETCH(bool, cache); QFETCH(QString, error); + +#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID) + if (qstrcmp(QTest::currentDataTag(), "remote") == 0 + || qstrcmp(QTest::currentDataTag(), "remote redirected") == 0 + || qstrcmp(QTest::currentDataTag(), "remote svg") == 0 + || qstrcmp(QTest::currentDataTag(), "remote svgz") == 0 + || qstrcmp(QTest::currentDataTag(), "remote not found") == 0 + ) { + QSKIP("Remote tests cause occasional hangs in the CI system -- QTBUG-45655"); + } +#endif + TestHTTPServer server; if (remote) { - QVERIFY2(server.listen(SERVER_PORT), qPrintable(server.errorString())); + QVERIFY2(server.listen(), qPrintable(server.errorString())); server.serveDirectory(dataDirectory()); - server.addRedirect("oldcolors.png", SERVER_ADDR "/colors.png"); + server.addRedirect("oldcolors.png", server.urlString("/colors.png")); + source = server.urlString(source); + error.replace(QStringLiteral("{{ServerBaseUrl}}"), server.baseUrl().toString()); } if (!error.isEmpty()) @@@ -571,9 -558,8 +570,9 @@@ void tst_qquickimage::noLoading( QTRY_COMPARE(statusSpy.count(), 3); // Loading remote file again - should not go through 'Loading' state. + progressSpy.clear(); ctxt->setContextProperty("srcImage", testFileUrl("green.png")); - ctxt->setContextProperty("srcImage", QString(SERVER_ADDR) + "/rect.png"); + ctxt->setContextProperty("srcImage", server.url("/rect.png")); QTRY_VERIFY(obj->status() == QQuickImage::Ready); QTRY_VERIFY(obj->progress() == 1.0); QTRY_COMPARE(sourceSpy.count(), 4); diff --cc tests/auto/quick/qquicktext/tst_qquicktext.cpp index ad21d177d,f25c09fcd..00c3957ba --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@@ -2051,8 -2046,8 +2048,8 @@@ void tst_qquicktext::embeddedImages_dat QTest::newRow("local") << testFileUrl("embeddedImagesLocalRelative.qml") << ""; QTest::newRow("remote") << testFileUrl("embeddedImagesRemote.qml") << ""; QTest::newRow("remote-error") << testFileUrl("embeddedImagesRemoteError.qml") - << testFileUrl("embeddedImagesRemoteError.qml").toString()+":3:1: QML Text: Error downloading " SERVER_ADDR "/notexists.png - server replied: Not found"; + << testFileUrl("embeddedImagesRemoteError.qml").toString()+":3:1: QML Text: Error downloading {{ServerBaseUrl}}/notexists.png - server replied: Not found"; - QTest::newRow("remote") << testFileUrl("embeddedImagesRemoteRelative.qml") << ""; + QTest::newRow("remote-relative") << testFileUrl("embeddedImagesRemoteRelative.qml") << ""; } void tst_qquicktext::embeddedImages() @@@ -2062,17 -2057,10 +2059,18 @@@ QFETCH(QUrl, qmlfile); QFETCH(QString, error); +#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID) + if (qstrcmp(QTest::currentDataTag(), "remote") == 0 + || qstrcmp(QTest::currentDataTag(), "remote-error") == 0 + || qstrcmp(QTest::currentDataTag(), "remote-relative") == 0) { + QSKIP("Remote tests cause occasional hangs in the CI system -- QTBUG-45655"); + } +#endif + TestHTTPServer server; - QVERIFY2(server.listen(SERVER_PORT), qPrintable(server.errorString())); + QVERIFY2(server.listen(), qPrintable(server.errorString())); server.serveDirectory(testFile("http")); + error.replace(QStringLiteral("{{ServerBaseUrl}}"), server.baseUrl().toString()); if (!error.isEmpty()) QTest::ignoreMessage(QtWarningMsg, error.toLatin1());