summaryrefslogtreecommitdiffstats
path: root/tests/auto/qhttpnetworkconnection
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-10-26 18:02:10 +0200
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-10-27 14:40:29 +0200
commitbe18016694c57fef508aa4715f5b8f9bbf21e5ac (patch)
tree56393efdb9b39d3181c3213bc5639f75050ee328 /tests/auto/qhttpnetworkconnection
parenta754c657db2d812911f278299c64001f37c2aae8 (diff)
QNAM HTTP: Remove enableEncryption()
Reviewed-by: Prasanth Task-Number: QTBUG-13234
Diffstat (limited to 'tests/auto/qhttpnetworkconnection')
-rw-r--r--tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp26
1 files changed, 5 insertions, 21 deletions
diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index 0956b57e3d..29fe2fb6b8 100644
--- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -175,11 +175,9 @@ void tst_QHttpNetworkConnection::head()
QFETCH(QString, statusString);
QFETCH(int, contentLength);
- QHttpNetworkConnection connection(host);
+ QHttpNetworkConnection connection(host, port, encrypt);
QCOMPARE(connection.port(), port);
QCOMPARE(connection.hostName(), host);
- if (encrypt)
- connection.enableEncryption();
QCOMPARE(connection.isEncrypted(), encrypt);
QHttpNetworkRequest request(protocol + host + path, QHttpNetworkRequest::Head);
@@ -235,11 +233,9 @@ void tst_QHttpNetworkConnection::get()
QFETCH(int, contentLength);
QFETCH(int, downloadSize);
- QHttpNetworkConnection connection(host);
+ QHttpNetworkConnection connection(host, port, encrypt);
QCOMPARE(connection.port(), port);
QCOMPARE(connection.hostName(), host);
- if (encrypt)
- connection.enableEncryption();
QCOMPARE(connection.isEncrypted(), encrypt);
QHttpNetworkRequest request(protocol + host + path);
@@ -315,11 +311,9 @@ void tst_QHttpNetworkConnection::put()
QFETCH(QString, data);
QFETCH(bool, succeed);
- QHttpNetworkConnection connection(host);
+ QHttpNetworkConnection connection(host, port, encrypt);
QCOMPARE(connection.port(), port);
QCOMPARE(connection.hostName(), host);
- if (encrypt)
- connection.enableEncryption();
QCOMPARE(connection.isEncrypted(), encrypt);
QHttpNetworkRequest request(protocol + host + path, QHttpNetworkRequest::Put);
@@ -407,11 +401,9 @@ void tst_QHttpNetworkConnection::post()
QFETCH(int, contentLength);
QFETCH(int, downloadSize);
- QHttpNetworkConnection connection(host);
+ QHttpNetworkConnection connection(host, port, encrypt);
QCOMPARE(connection.port(), port);
QCOMPARE(connection.hostName(), host);
- if (encrypt)
- connection.enableEncryption();
QCOMPARE(connection.isEncrypted(), encrypt);
QHttpNetworkRequest request(protocol + host + path, QHttpNetworkRequest::Post);
@@ -549,8 +541,6 @@ void tst_QHttpNetworkConnection::get401()
QHttpNetworkConnection connection(host, port, encrypt);
QCOMPARE(connection.port(), port);
QCOMPARE(connection.hostName(), host);
- if (encrypt)
- connection.enableEncryption();
QCOMPARE(connection.isEncrypted(), encrypt);
connection.setProperty("setCredentials", setCredentials);
connection.setProperty("username", username);
@@ -618,11 +608,9 @@ void tst_QHttpNetworkConnection::compression()
QFETCH(bool, autoCompress);
QFETCH(QString, contentCoding);
- QHttpNetworkConnection connection(host);
+ QHttpNetworkConnection connection(host, port, encrypt);
QCOMPARE(connection.port(), port);
QCOMPARE(connection.hostName(), host);
- if (encrypt)
- connection.enableEncryption();
QCOMPARE(connection.isEncrypted(), encrypt);
QHttpNetworkRequest request(protocol + host + path);
@@ -713,8 +701,6 @@ void tst_QHttpNetworkConnection::ignoresslerror()
QHttpNetworkConnection connection(host, port, encrypt);
QCOMPARE(connection.port(), port);
QCOMPARE(connection.hostName(), host);
- if (encrypt)
- connection.enableEncryption();
if (ignoreInit)
connection.ignoreSslErrors();
QCOMPARE(connection.isEncrypted(), encrypt);
@@ -771,8 +757,6 @@ void tst_QHttpNetworkConnection::nossl()
QHttpNetworkConnection connection(host, port, encrypt);
QCOMPARE(connection.port(), port);
QCOMPARE(connection.hostName(), host);
- if (encrypt)
- connection.enableEncryption();
QHttpNetworkRequest request(protocol + host + path);
QHttpNetworkReply *reply = connection.sendRequest(request);