diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-10-26 16:02:10 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-10-27 12:40:29 (GMT) |
commit | be18016694c57fef508aa4715f5b8f9bbf21e5ac (patch) | |
tree | 56393efdb9b39d3181c3213bc5639f75050ee328 /tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp | |
parent | a754c657db2d812911f278299c64001f37c2aae8 (diff) | |
download | Qt-be18016694c57fef508aa4715f5b8f9bbf21e5ac.zip Qt-be18016694c57fef508aa4715f5b8f9bbf21e5ac.tar.gz Qt-be18016694c57fef508aa4715f5b8f9bbf21e5ac.tar.bz2 |
QNAM HTTP: Remove enableEncryption()
Reviewed-by: Prasanth
Task-Number: QTBUG-13234
Diffstat (limited to 'tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp')
-rw-r--r-- | tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp index 0956b57..29fe2fb 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); |