diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-02-11 06:32:04 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-02-11 06:32:04 (GMT) |
commit | 8e72075b8333dcefaa7ddbaeb0bc7ae45d42ff1e (patch) | |
tree | b8b69f812095df8bf780f88302c7784c4d2e18e0 /tests/auto/qhttp/tst_qhttp.cpp | |
parent | 34450eb48e56677395601bf155a6a05752b326ad (diff) | |
parent | dbfe5f81e300de3a43311197826f23ff031b4b23 (diff) | |
download | Qt-8e72075b8333dcefaa7ddbaeb0bc7ae45d42ff1e.zip Qt-8e72075b8333dcefaa7ddbaeb0bc7ae45d42ff1e.tar.gz Qt-8e72075b8333dcefaa7ddbaeb0bc7ae45d42ff1e.tar.bz2 |
Merge remote branch 'origin/master' into bearermanagement/integration
Conflicts:
configure
Diffstat (limited to 'tests/auto/qhttp/tst_qhttp.cpp')
-rw-r--r-- | tests/auto/qhttp/tst_qhttp.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/tests/auto/qhttp/tst_qhttp.cpp b/tests/auto/qhttp/tst_qhttp.cpp index 59bfb15..320225d 100644 --- a/tests/auto/qhttp/tst_qhttp.cpp +++ b/tests/auto/qhttp/tst_qhttp.cpp @@ -114,9 +114,6 @@ private slots: void abortInReadyRead(); void abortInResponseHeaderReceived(); void nestedEventLoop(); - - - // manual tests void connectionClose(); protected slots: @@ -175,6 +172,23 @@ private: bool proxyAuthCalled; }; +class ClosingServer: public QTcpServer +{ + Q_OBJECT +public: + ClosingServer() + { + connect(this, SIGNAL(newConnection()), SLOT(handleConnection())); + listen(); + } + +public slots: + void handleConnection() + { + delete nextPendingConnection(); + } +}; + //#define DUMP_SIGNALS const int bytesTotal_init = -10; @@ -1491,20 +1505,14 @@ void tst_QHttp::abortInResponseHeaderReceived() void tst_QHttp::connectionClose() { - // This test tries to connect to a client's server, so it is disabled. - // Every now and then, someone please run it to make sure it's not broken. - // Note: the servers might change too... - // // This was added in response to bug 176822 -#ifndef Q_OS_SYMBIAN - QSKIP("This test is manual - read comments in the source code", SkipAll); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; QHttp http; - http.setHost("www.fon.com", QHttp::ConnectionModeHttps); + ClosingServer server; + http.setHost("localhost", QHttp::ConnectionModeHttps, server.serverPort()); http.get("/login/gateway/processLogin"); // another possibility: |