summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2011-01-18 11:49:36 +0100
committerMarkus Goetz <Markus.Goetz@nokia.com>2011-02-04 16:23:10 +0100
commit59caa5b23104dd1c6fb368fbd840a6b491536130 (patch)
treef8d3d245a4e01b4fbab5c6ad485c33f977b7a91a /tests
parent4985369c26dd6397a8a5b51f6e53b6394efd8bf8 (diff)
downloadqt4-tools-59caa5b23104dd1c6fb368fbd840a6b491536130.tar.gz
tst_qnetworkreply: Some additions
Diffstat (limited to 'tests')
-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 fd494c642f..fd37ebd6ac 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()
{