summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2020-05-07 17:34:22 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2020-08-05 17:19:10 +0200
commit7b76379a89158f10780cbfc74965027246faec68 (patch)
treed289667ca662d538cb768126c8ed076b7e8e4dfc /tests/auto
parent7ec0786d78c7420244d488553d7d10eee4fe60b2 (diff)
Make use of QDecompressHelper for HTTP downloads
Changes are not too big for now. Just replaces use of the previous calls to the zlib decompression function. And initialize QDecompressHelper when we know the content-encoding. Task-number: QTBUG-83269 Change-Id: I41358feaef2e7ac5f48f14e3f95ec094e0c110b7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/network/access/qdecompresshelper/tst_qdecompresshelper.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/network/access/qdecompresshelper/tst_qdecompresshelper.cpp b/tests/auto/network/access/qdecompresshelper/tst_qdecompresshelper.cpp
index 0b302982a6..4f54839ec0 100644
--- a/tests/auto/network/access/qdecompresshelper/tst_qdecompresshelper.cpp
+++ b/tests/auto/network/access/qdecompresshelper/tst_qdecompresshelper.cpp
@@ -82,11 +82,15 @@ void tst_QDecompressHelper::cleanupTestCase()
void tst_QDecompressHelper::encodingSupported()
{
- QVERIFY(!QDecompressHelper::isSupportedEncoding("identity"));
- QVERIFY(!QDecompressHelper::isSupportedEncoding("fake"));
+ const QByteArrayList &accepted = QDecompressHelper::acceptedEncoding();
QVERIFY(QDecompressHelper::isSupportedEncoding("deflate"));
+ QVERIFY(accepted.contains("deflate"));
QVERIFY(QDecompressHelper::isSupportedEncoding("gzip"));
+ QVERIFY(accepted.contains("gzip"));
+ int expected = 2;
+
+ QCOMPARE(expected, accepted.size());
}
void tst_QDecompressHelper::sharedDecompress_data()