summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/access
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2017-02-20 12:57:02 +0100
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2017-03-29 13:54:49 +0000
commitbaf71807768d81bf0d436063561b7589686c8a2c (patch)
tree102ab671f8485d405b4aa602dc7561e8dce82c24 /tests/auto/network/access
parent886ce572d628e7cd98cc39edcc930ffae951e95e (diff)
Use HTTP2WasUsedAttribute for HTTP2
Previously we were always setting SpdyWasUsedAttribute for SPDY/HTTP/2/HTTP/1.1 (true/false) which is confusing. Now if HTTP2AllowedAttribute was set to true on a request, we set HTTP2WasUsedAttribute. Otherwise, as we did before, we're setting SpdyWasUsedAttribute. Change-Id: I0c44cfb5469fef0c12719baa951197ee2accee4a Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto/network/access')
-rw-r--r--tests/auto/network/access/http2/tst_http2.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/network/access/http2/tst_http2.cpp b/tests/auto/network/access/http2/tst_http2.cpp
index e7609b3243..d7a57f5e26 100644
--- a/tests/auto/network/access/http2/tst_http2.cpp
+++ b/tests/auto/network/access/http2/tst_http2.cpp
@@ -590,8 +590,15 @@ void tst_Http2::replyFinished()
{
QVERIFY(nRequests);
- if (const auto reply = qobject_cast<QNetworkReply *>(sender()))
+ if (const auto reply = qobject_cast<QNetworkReply *>(sender())) {
QCOMPARE(reply->error(), QNetworkReply::NoError);
+ const QVariant http2Used(reply->attribute(QNetworkRequest::HTTP2WasUsedAttribute));
+ QVERIFY(http2Used.isValid());
+ QVERIFY(http2Used.toBool());
+ const QVariant spdyUsed(reply->attribute(QNetworkRequest::SpdyWasUsedAttribute));
+ QVERIFY(spdyUsed.isValid());
+ QVERIFY(!spdyUsed.toBool());
+ }
--nRequests;
if (!nRequests && serverGotSettingsACK)