summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-02-10 16:57:11 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-02-10 16:57:11 +0000
commit0866680bd904aff4fe2a643a2b81c460cbb99c77 (patch)
tree242dae052199994a35f5e68578661175241a0a71 /tests/manual
parent34ea269b3b173498312b0203d6875ef3b4ba0253 (diff)
parentfc35f714340d5361231506dfbead132122f59460 (diff)
Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/diaglib/nativewindowdump_win.cpp2
-rw-r--r--tests/manual/diaglib/qwidgetdump.cpp2
-rw-r--r--tests/manual/diaglib/qwindowdump.cpp4
-rw-r--r--tests/manual/qnetworkreply/main.cpp29
4 files changed, 35 insertions, 2 deletions
diff --git a/tests/manual/diaglib/nativewindowdump_win.cpp b/tests/manual/diaglib/nativewindowdump_win.cpp
index 69ba17a5d0..0fbba08a21 100644
--- a/tests/manual/diaglib/nativewindowdump_win.cpp
+++ b/tests/manual/diaglib/nativewindowdump_win.cpp
@@ -170,7 +170,7 @@ static void dumpNativeWindows(const WIdVector& wins)
dc.stream = QSharedPointer<QTextStream>(new QTextStream(&s));
foreach (WId win, wins)
dumpNativeWindowRecursion(reinterpret_cast<HWND>(win), &dc);
-#if QT_VERSION > 0x050000
+#if QT_VERSION >= 0x050400
qDebug().noquote() << s;
#else
qDebug("%s", qPrintable(s));
diff --git a/tests/manual/diaglib/qwidgetdump.cpp b/tests/manual/diaglib/qwidgetdump.cpp
index d4f985c7c8..894f51bce3 100644
--- a/tests/manual/diaglib/qwidgetdump.cpp
+++ b/tests/manual/diaglib/qwidgetdump.cpp
@@ -84,7 +84,7 @@ void dumpAllWidgets(FormatWindowOptions options)
str << "### QWidgets:\n";
foreach (QWidget *tw, QApplication::topLevelWidgets())
dumpWidgetRecursion(str, tw, options);
-#if QT_VERSION > 0x050000
+#if QT_VERSION >= 0x050400
qDebug().noquote() << d;
#else
qDebug("%s", qPrintable(d));
diff --git a/tests/manual/diaglib/qwindowdump.cpp b/tests/manual/diaglib/qwindowdump.cpp
index 2ecc52ca77..228472cd44 100644
--- a/tests/manual/diaglib/qwindowdump.cpp
+++ b/tests/manual/diaglib/qwindowdump.cpp
@@ -157,7 +157,11 @@ void dumpAllWindows(FormatWindowOptions options)
str << "### QWindows:\n";
foreach (QWindow *w, QGuiApplication::topLevelWindows())
dumpWindowRecursion(str, w, options);
+#if QT_VERSION >= 0x050400
qDebug().noquote() << d;
+#else
+ qDebug() << d;
+#endif
}
#else // Qt 5
diff --git a/tests/manual/qnetworkreply/main.cpp b/tests/manual/qnetworkreply/main.cpp
index f91309502b..a0680b5af9 100644
--- a/tests/manual/qnetworkreply/main.cpp
+++ b/tests/manual/qnetworkreply/main.cpp
@@ -69,6 +69,7 @@ private slots:
void proxyAuthentication_data();
void proxyAuthentication();
void authentication();
+ void npnWithEmptyList(); // QTBUG-40714
protected slots:
void spdyReplyFinished(); // only used by spdyMultipleRequestsPerHost test
@@ -579,6 +580,34 @@ void tst_qnetworkreply::authentication()
QVERIFY(statusCode >= 200 && statusCode < 400);
}
+void tst_qnetworkreply::npnWithEmptyList() // QTBUG-40714
+{
+#if defined(QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) && OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
+
+ // The server does not send a list of Next Protocols, so we test
+ // that we continue anyhow and it works
+
+ m_manager.clearAccessCache();
+
+ QUrl url(QStringLiteral("https://www.ossifrage.net/"));
+ QNetworkRequest request(url);
+ request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, QVariant(true));
+ QNetworkReply *reply = m_manager.get(request);
+ QObject::connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+
+ QTestEventLoop::instance().enterLoop(15);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ int statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
+ QVERIFY(statusCode == 200);
+
+ QCOMPARE(reply->sslConfiguration().nextProtocolNegotiationStatus(),
+ QSslConfiguration::NextProtocolNegotiationUnsupported);
+#else
+ QSKIP("Qt built withouth OpenSSL, or the OpenSSL version is too old");
+#endif // defined(QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) ...
+}
+
QTEST_MAIN(tst_qnetworkreply)
#include "main.moc"