diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-15 19:23:21 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-15 19:23:21 (GMT) |
commit | 4d9d3ed84c3bf1f6d08a9ddd36f834b9c8972b38 (patch) | |
tree | 737a08d2c1ad8f56c210e3ae42fe10b2954bde04 /tests | |
parent | 1c38e7c2107b7cb7ff997126ded3819d760a3191 (diff) | |
parent | b498c15ebbf120819f73fe761388fd63c2de4b23 (diff) | |
download | Qt-4d9d3ed84c3bf1f6d08a9ddd36f834b9c8972b38.zip Qt-4d9d3ed84c3bf1f6d08a9ddd36f834b9c8972b38.tar.gz Qt-4d9d3ed84c3bf1f6d08a9ddd36f834b9c8972b38.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
QNAM HTTP: Fix error signal emission for unreachable IPs
Cocoa: small update to 534ba3c7314820604ba5aeeffa6051c91e7c1d09
Change git commit template
Cocoa: fix child window issues (QTBUG 13867, 14420, 13126)
tst_qnetworkreply: New auto test for unreachable IPs
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 306b5f8..88714e6 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -291,6 +291,8 @@ private Q_SLOTS: void qtbug12908compressedHttpReply(); + void getFromUnreachableIp(); + // NOTE: This test must be last! void parentingRepliesToTheApp(); }; @@ -4301,6 +4303,19 @@ void tst_QNetworkReply::qtbug12908compressedHttpReply() QCOMPARE(reply->error(), QNetworkReply::NoError); } +void tst_QNetworkReply::getFromUnreachableIp() +{ + QNetworkAccessManager manager; + + QNetworkRequest request(QUrl("http://255.255.255.255/42/23/narf/narf/narf")); + QNetworkReplyPtr reply = manager.get(request); + + connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); + QTestEventLoop::instance().enterLoop(5); + QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(reply->error() != QNetworkReply::NoError); +} // NOTE: This test must be last testcase in tst_qnetworkreply! void tst_QNetworkReply::parentingRepliesToTheApp() |