diff options
Diffstat (limited to 'tests/auto/qsslsocket')
-rw-r--r-- | tests/auto/qsslsocket/qsslsocket.pro | 4 | ||||
-rw-r--r-- | tests/auto/qsslsocket/tst_qsslsocket.cpp | 40 |
2 files changed, 22 insertions, 22 deletions
diff --git a/tests/auto/qsslsocket/qsslsocket.pro b/tests/auto/qsslsocket/qsslsocket.pro index 8f61318..147175e 100644 --- a/tests/auto/qsslsocket/qsslsocket.pro +++ b/tests/auto/qsslsocket/qsslsocket.pro @@ -17,7 +17,7 @@ win32 { wince* { DEFINES += SRCDIR=\\\"./\\\" - + certFiles.sources = certs ssl.tar.gz certFiles.path = . DEPLOYMENT += certFiles @@ -25,7 +25,7 @@ wince* { DEFINES += QSSLSOCKET_CERTUNTRUSTED_WORKAROUND TARGET.EPOCHEAPSIZE="0x100 0x1000000" TARGET.CAPABILITY="ALL -TCB" - + certFiles.sources = certs ssl.tar.gz certFiles.path = . DEPLOYMENT += certFiles diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index 225f4d1..12e8f1b 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -199,9 +199,9 @@ protected slots: } void untrustedWorkaroundSlot(const QList<QSslError> &errors) { - if (errors.size() == 1 && - (errors.first().error() == QSslError::CertificateUntrusted || - errors.first().error() == QSslError::SelfSignedCertificate)) + if (errors.size() == 1 && + (errors.first().error() == QSslError::CertificateUntrusted || + errors.first().error() == QSslError::SelfSignedCertificate)) socket->ignoreSslErrors(); } void ignoreErrorListSlot(const QList<QSslError> &errors); @@ -229,7 +229,7 @@ tst_QSslSocket::tst_QSslSocket() } tst_QSslSocket::~tst_QSslSocket() -{ +{ } enum ProxyTests { @@ -504,7 +504,7 @@ void tst_QSslSocket::simpleConnectWithIgnore() if (!socket.canReadLine()) enterLoop(10); - QCOMPARE(socket.readAll(), QtNetworkSettings::expectedReplySSL()); + QCOMPARE(socket.readAll(), QtNetworkSettings::expectedReplySSL()); socket.disconnectFromHost(); } @@ -952,7 +952,7 @@ void tst_QSslSocket::waitForConnectedEncryptedReadyRead() QVERIFY(socket->waitForConnected(10000)); QVERIFY(socket->waitForEncrypted(10000)); - // dont forget to login + // dont forget to login QCOMPARE((int) socket->write("USER ftptest\r\n"), 14); QCOMPARE((int) socket->write("PASS ftP2Ptf\r\n"), 14); @@ -1056,7 +1056,7 @@ void tst_QSslSocket::systemCaCertificates() void tst_QSslSocket::wildcard() { - QSKIP("TODO: solve wildcard problem", SkipAll); + QSKIP("TODO: solve wildcard problem", SkipAll); if (!QSslSocket::supportsSsl()) return; @@ -1311,11 +1311,11 @@ protected: // delayed acceptance: QTest::qSleep(100); -#ifndef Q_OS_SYMBIAN +#ifndef Q_OS_SYMBIAN bool ret = server.waitForNewConnection(2000); #else - bool ret = server.waitForNewConnection(20000); -#endif + bool ret = server.waitForNewConnection(20000); +#endif // delayed start of encryption QTest::qSleep(100); @@ -1503,13 +1503,13 @@ void tst_QSslSocket::disconnectFromHostWhenConnecting() // without proxy, the state will be HostLookupState; // with proxy, the state will be ConnectingState. QVERIFY(socket->state() == QAbstractSocket::HostLookupState || - socket->state() == QAbstractSocket::ConnectingState); + socket->state() == QAbstractSocket::ConnectingState); socket->disconnectFromHost(); // the state of the socket must be the same before and after calling // disconnectFromHost() QCOMPARE(state, socket->state()); QVERIFY(socket->state() == QAbstractSocket::HostLookupState || - socket->state() == QAbstractSocket::ConnectingState); + socket->state() == QAbstractSocket::ConnectingState); QVERIFY(socket->waitForDisconnected(5000)); QCOMPARE(socket->state(), QAbstractSocket::UnconnectedState); // we did not call close, so the socket must be still open @@ -1526,16 +1526,16 @@ void tst_QSslSocket::disconnectFromHostWhenConnected() QSslSocketPtr socket = newSocket(); socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 993); socket->ignoreSslErrors(); -#ifndef Q_OS_SYMBIAN +#ifndef Q_OS_SYMBIAN QVERIFY(socket->waitForEncrypted(5000)); -#else - QVERIFY(socket->waitForEncrypted(10000)); -#endif +#else + QVERIFY(socket->waitForEncrypted(10000)); +#endif socket->write("XXXX LOGOUT\r\n"); QCOMPARE(socket->state(), QAbstractSocket::ConnectedState); socket->disconnectFromHost(); QCOMPARE(socket->state(), QAbstractSocket::ClosingState); -#ifdef Q_OS_SYMBIAN +#ifdef Q_OS_SYMBIAN // I don't understand how socket->waitForDisconnected can work on other platforms // since socket->write will end to: // QMetaObject::invokeMethod(this, "_q_flushWriteBuffer", Qt::QueuedConnection); @@ -1544,9 +1544,9 @@ void tst_QSslSocket::disconnectFromHostWhenConnected() connect(socket, SIGNAL(disconnected()), this, SLOT(exitLoop())); enterLoop(5); QVERIFY(!timeout()); -#else - QVERIFY(socket->waitForDisconnected(5000)); -#endif +#else + QVERIFY(socket->waitForDisconnected(5000)); +#endif QCOMPARE(socket->bytesToWrite(), qint64(0)); } |