summaryrefslogtreecommitdiffstats
path: root/tests/auto/qnetworkreply
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-11-04 14:24:32 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-11-04 14:35:45 (GMT)
commit6bf640a7600132c02742a2581402e04f75b60962 (patch)
tree9609de4ac52dd063ece0a151ac81c38078423573 /tests/auto/qnetworkreply
parent440888de851daad78d89f2958aa95e9193832fb5 (diff)
downloadQt-6bf640a7600132c02742a2581402e04f75b60962.zip
Qt-6bf640a7600132c02742a2581402e04f75b60962.tar.gz
Qt-6bf640a7600132c02742a2581402e04f75b60962.tar.bz2
QNAM HTTP: Download last chunk properly when readBufferSize() limited
Task-number: QTBUG-13431 Task-number: QTBUG-6276 Reviewed-by: ogoffart
Diffstat (limited to 'tests/auto/qnetworkreply')
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index 8850e6e..d21428b 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -3457,11 +3457,11 @@ void tst_QNetworkReply::ioGetFromBuiltinHttp_data()
{
QTest::addColumn<bool>("https");
QTest::addColumn<int>("bufferSize");
- QTest::newRow("http, no limit") << false << 0;
- QTest::newRow("http, limited") << false << 4096;
+ QTest::newRow("http+unlimited") << false << 0;
+ QTest::newRow("http+limited") << false << 4096;
#ifndef QT_NO_OPENSSL
- QTest::newRow("https, no limit") << true << 0;
- QTest::newRow("https, limited") << true << 4096;
+ QTest::newRow("https+unlimited") << true << 0;
+ QTest::newRow("https+limited") << true << 4096;
#endif
}
@@ -3534,6 +3534,7 @@ void tst_QNetworkReply::ioGetFromBuiltinHttp()
const int allowedDeviation = 16; // TODO find out why the send rate is 13% faster currently
const int minRate = rate * 1024 * (100-allowedDeviation) / 100;
const int maxRate = rate * 1024 * (100+allowedDeviation) / 100;
+ qDebug() << minRate << "<="<< server.transferRate << "<=" << maxRate << "?";
QVERIFY(server.transferRate >= minRate);
QVERIFY(server.transferRate <= maxRate);
}