summaryrefslogtreecommitdiffstats
path: root/tests/auto/qnetworkreply
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2011-01-18 10:49:36 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2011-02-04 15:23:10 (GMT)
commit59caa5b23104dd1c6fb368fbd840a6b491536130 (patch)
treef8d3d245a4e01b4fbab5c6ad485c33f977b7a91a /tests/auto/qnetworkreply
parent4985369c26dd6397a8a5b51f6e53b6394efd8bf8 (diff)
downloadQt-59caa5b23104dd1c6fb368fbd840a6b491536130.zip
Qt-59caa5b23104dd1c6fb368fbd840a6b491536130.tar.gz
Qt-59caa5b23104dd1c6fb368fbd840a6b491536130.tar.bz2
tst_qnetworkreply: Some additions
Diffstat (limited to 'tests/auto/qnetworkreply')
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index fd494c6..fd37ebd 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -342,6 +342,8 @@ private Q_SLOTS:
void synchronousRequest();
void synchronousRequestSslFailure();
+ void httpAbort();
+
// NOTE: This test must be last!
void parentingRepliesToTheApp();
};
@@ -4566,7 +4568,7 @@ void tst_QNetworkReply::proxyChange()
manager.setProxy(dummyProxy);
QNetworkReplyPtr reply3 = manager.get(req);
connect(reply3, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QTestEventLoop::instance().enterLoop(1);
+ QTestEventLoop::instance().enterLoop(5);
QVERIFY(!QTestEventLoop::instance().timeout());
QVERIFY(int(reply3->error()) > 0);
@@ -5502,6 +5504,18 @@ void tst_QNetworkReply::synchronousRequestSslFailure()
QCOMPARE(sslErrorsSpy.count(), 0);
}
+void tst_QNetworkReply::httpAbort()
+{
+ // FIXME: Implement a test that aborts a big HTTP reply
+ // a) after the first readyRead()
+ // b) immediatly after the get()
+ // c) after the finished()
+ // The goal is no crash and no irrelevant signals after the abort
+
+ // FIXME Also implement one where we do a big upload and then abort().
+ // It must not crash either.
+}
+
// NOTE: This test must be last testcase in tst_qnetworkreply!
void tst_QNetworkReply::parentingRepliesToTheApp()
{