summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-06-03 07:10:19 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-06-03 07:10:19 (GMT)
commit917372922f90b1b108575ad391aa74c9d0d9c94d (patch)
treefa4cf53bd2fa79b4db58302b87cff2104981f933 /tests
parent526a31361417fec3da9910f6e5c0a864556dfefe (diff)
downloadQt-917372922f90b1b108575ad391aa74c9d0d9c94d.zip
Qt-917372922f90b1b108575ad391aa74c9d0d9c94d.tar.gz
Qt-917372922f90b1b108575ad391aa74c9d0d9c94d.tar.bz2
Adapted _networkselftest autotest for Symbian environment.
- Fixed SRCDIR thing - Added default IAP handling - Skipped NTML related test cases for now
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/_networkselftest/_networkselftest.pro2
-rw-r--r--tests/auto/_networkselftest/tst_networkselftest.cpp30
2 files changed, 29 insertions, 3 deletions
diff --git a/tests/auto/_networkselftest/_networkselftest.pro b/tests/auto/_networkselftest/_networkselftest.pro
index 9e2ad0e..a2e1adf 100644
--- a/tests/auto/_networkselftest/_networkselftest.pro
+++ b/tests/auto/_networkselftest/_networkselftest.pro
@@ -2,5 +2,5 @@ load(qttest_p4)
SOURCES += tst_networkselftest.cpp
QT = core network
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+!symbian:DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/_networkselftest/tst_networkselftest.cpp b/tests/auto/_networkselftest/tst_networkselftest.cpp
index dab4433..0e64988 100644
--- a/tests/auto/_networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/_networkselftest/tst_networkselftest.cpp
@@ -43,9 +43,17 @@
#include <QtNetwork/QtNetwork>
#include "../network-settings.h"
+#if defined(Q_OS_SYMBIAN)
+#define SRCDIR ""
+#endif
+
class tst_NetworkSelfTest: public QObject
{
Q_OBJECT
+public:
+ tst_NetworkSelfTest();
+ virtual ~tst_NetworkSelfTest();
+
private slots:
void hostTest();
void dnsResolution_data();
@@ -60,7 +68,7 @@ private slots:
void httpServer();
void httpsServer();
void httpProxy();
- void httpProxyBasicAuth();
+ void httpProxyBasicAuth();
void httpProxyNtlmAuth();
void socks5Proxy();
void socks5ProxyAuth();
@@ -309,6 +317,15 @@ static void netChat(int port, const QList<Chat> &chat)
}
}
+tst_NetworkSelfTest::tst_NetworkSelfTest()
+{
+ Q_SET_DEFAULT_IAP
+}
+
+tst_NetworkSelfTest::~tst_NetworkSelfTest()
+{
+}
+
void tst_NetworkSelfTest::hostTest()
{
// this is a localhost self-test
@@ -360,13 +377,18 @@ void tst_NetworkSelfTest::remotePortsOpen_data()
QTest::newRow("https") << 443;
QTest::newRow("http-proxy") << 3128;
QTest::newRow("http-proxy-auth-basic") << 3129;
- QTest::newRow("http-proxy-auth-ntlm") << 3130;
+ QTest::newRow("http-proxy-auth-ntlm") << 3130;
QTest::newRow("socks5-proxy") << 1080;
QTest::newRow("socks5-proxy-auth") << 1081;
}
void tst_NetworkSelfTest::remotePortsOpen()
{
+#ifdef Q_OS_SYMBIAN
+ if (qstrcmp(QTest::currentDataTag(), "http-proxy-auth-ntlm") == 0)
+ QSKIP("NTML authentication not yet supported in Symbian", SkipSingle);
+#endif
+
QFETCH(int, portNumber);
QTcpSocket socket;
socket.connectToHost(QtNetworkSettings::serverName(), portNumber);
@@ -520,6 +542,9 @@ void tst_NetworkSelfTest::httpProxyBasicAuth()
void tst_NetworkSelfTest::httpProxyNtlmAuth()
{
+#ifdef Q_OS_SYMBIAN
+ QSKIP("NTML authentication not yet supported in Symbian", SkipAll);
+#else
netChat(3130, QList<Chat>()
// test auth required response
<< Chat::send("GET http://" + QtNetworkSettings::serverName().toLatin1() + "/ HTTP/1.0\r\n"
@@ -532,6 +557,7 @@ void tst_NetworkSelfTest::httpProxyNtlmAuth()
<< Chat::discardUntil("\r\nProxy-Authenticate: NTLM\r\n")
<< Chat::DiscardUntilDisconnect
);
+#endif
}
// SOCKSv5 is a binary protocol