summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-06 12:44:20 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-06 12:44:20 (GMT)
commitd63accf173ed58c7746ecd1e3a40ecac263f186f (patch)
tree87573a93956f4844bde449bde3161972db826eb1 /tests/auto/qtcpsocket/tst_qtcpsocket.cpp
parentb0fd5e82c0d7d62a01cce2c1cdcb925bc5a34182 (diff)
parente8b3defc466fff9110ee00b6e730d405cde52abc (diff)
downloadQt-d63accf173ed58c7746ecd1e3a40ecac263f186f.zip
Qt-d63accf173ed58c7746ecd1e3a40ecac263f186f.tar.gz
Qt-d63accf173ed58c7746ecd1e3a40ecac263f186f.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (27 commits) Fix QT_NO_CONTEXTMENU Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 865abd2871c801c1d3d0f4eebd985b2daab89ebe ) Fix license check failure. QHttpSocketEngine: Remove unneeded code doc: Clarified that .lnk files are System files on Windows. doc: Clarified that the scene owns its items and destroys them. QAbstractSocket: Fix warnings when compiling with QABSTRACTSOCKET_DEBUG QAbstractSocket: Warn when wrong QHostInfo was received doc: Fixed references to currsor position(). Prevent a crash when creating an inputContext from the QApplication dtor. doc: Added some missing macro descriptions. Small optimization in QIODevice::readAll() doc: Added note explaining grabMouse() for Cocoa and Carbon. doc: Replaced usses of rootState() with state machine pointer. doc: Fixed typo. doc: Clarified which values were added in Qt 4.4. Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 5d691a1c283938dfbdf891883d8cff8a6ef040bf ) doc: Clarified next and previous activation order. Fix typo in QFSFileEnginePrivate::canonicalized tst_qhostinfo benchmark: Fix license header ...
Diffstat (limited to 'tests/auto/qtcpsocket/tst_qtcpsocket.cpp')
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index 863b8f5..c6d39ba 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -82,9 +82,6 @@
#include <QTime>
#include <QTimer>
#include <QDebug>
-#ifndef TEST_QNETWORK_PROXY
-#define TEST_QNETWORK_PROXY
-#endif
// RVCT compiles also unused inline methods
# include <QNetworkProxy>
@@ -194,12 +191,11 @@ private slots:
void increaseReadBufferSize();
void taskQtBug5799ConnectionErrorWaitForConnected();
void taskQtBug5799ConnectionErrorEventLoop();
-#ifdef TEST_QNETWORK_PROXY
+
void invalidProxy_data();
void invalidProxy();
void proxyFactory_data();
void proxyFactory();
-#endif
protected slots:
void nonBlockingIMAP_hostFound();
@@ -270,17 +266,15 @@ void tst_QTcpSocket::initTestCase_data()
qDebug() << QtNetworkSettings::serverName();
QTest::newRow("WithoutProxy") << false << 0 << false;
-#ifdef TEST_QNETWORK_PROXY
QTest::newRow("WithSocks5Proxy") << true << int(Socks5Proxy) << false;
QTest::newRow("WithSocks5ProxyAuth") << true << int(Socks5Proxy | AuthBasic) << false;
QTest::newRow("WithHttpProxy") << true << int(HttpProxy) << false;
QTest::newRow("WithHttpProxyBasicAuth") << true << int(HttpProxy | AuthBasic) << false;
// QTest::newRow("WithHttpProxyNtlmAuth") << true << int(HttpProxy | AuthNtlm) << false;
-#endif
+
#ifndef QT_NO_OPENSSL
QTest::newRow("WithoutProxy SSL") << false << 0 << true;
-#ifdef TEST_QNETWORK_PROXY
QTest::newRow("WithSocks5Proxy SSL") << true << int(Socks5Proxy) << true;
QTest::newRow("WithSocks5AuthProxy SSL") << true << int(Socks5Proxy | AuthBasic) << true;
@@ -288,14 +282,12 @@ void tst_QTcpSocket::initTestCase_data()
QTest::newRow("WithHttpProxyBasicAuth SSL") << true << int(HttpProxy | AuthBasic) << true;
// QTest::newRow("WithHttpProxyNtlmAuth SSL") << true << int(HttpProxy | AuthNtlm) << true;
#endif
-#endif
}
void tst_QTcpSocket::init()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
QString fluke = QHostInfo::fromName(QtNetworkSettings::serverName()).addresses().first().toString();
QNetworkProxy proxy;
@@ -322,7 +314,6 @@ void tst_QTcpSocket::init()
break;
}
QNetworkProxy::setApplicationProxy(proxy);
-#endif
}
}
@@ -345,9 +336,7 @@ QTcpSocket *tst_QTcpSocket::newSocket() const
void tst_QTcpSocket::cleanup()
{
-#ifdef TEST_QNETWORK_PROXY
QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy);
-#endif
}
void tst_QTcpSocket::proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth)
@@ -1322,9 +1311,7 @@ void tst_QTcpSocket::synchronousApi()
void tst_QTcpSocket::dontCloseOnTimeout()
{
QTcpServer server;
-#ifdef TEST_QNETWORK_PROXY
server.setProxy(QNetworkProxy(QNetworkProxy::NoProxy));
-#endif
QVERIFY(server.listen());
QHostAddress serverAddress = QHostAddress::LocalHost;
@@ -1793,9 +1780,6 @@ void tst_QTcpSocket::readyReadSignalsAfterWaitForReadyRead()
QCOMPARE(readyReadSpy.count(), 1);
QString s = socket->readLine();
-#ifdef TEST_QNETWORK_PROXY
- QNetworkProxy::ProxyType proxyType = QNetworkProxy::applicationProxy().type();
-#endif
QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData());
QCOMPARE(socket->bytesAvailable(), qint64(0));
@@ -2252,9 +2236,6 @@ void tst_QTcpSocket::taskQtBug5799ConnectionErrorEventLoop()
QString("Could not reach server: %1").arg(socket.errorString()).toLocal8Bit());
}
-
-
-#ifdef TEST_QNETWORK_PROXY
void tst_QTcpSocket::invalidProxy_data()
{
QTest::addColumn<int>("type");
@@ -2433,7 +2414,6 @@ void tst_QTcpSocket::proxyFactory()
delete socket;
}
-#endif
QTEST_MAIN(tst_QTcpSocket)