Fix some warnings in symbian network tests
Ignore warning when the test intentionally sets an invalid socket descriptor. Make sure to set content type on all http post tests in tst_qnetworkreply. Run test with enough capabilities to avoid platsec errors when accessing certificate store. Reviewed-By: Markus Goetz (cherry picked from commit 9632fdefa9012ca11cd1345d66bafd6f417de88e)
This commit is contained in:
parent
1a1af689fc
commit
605102d5c6
@ -4103,6 +4103,7 @@ void tst_QNetworkReply::ioPostToHttpFromMiddleOfQBufferFiveBytes()
|
||||
|
||||
QUrl url = "http://" + QtNetworkSettings::serverName() + "/qtest/protected/cgi-bin/md5sum.cgi";
|
||||
QNetworkRequest request(url);
|
||||
request.setRawHeader("Content-Type", "application/octet-stream");
|
||||
QNetworkReplyPtr reply = manager.post(request, &uploadBuffer);
|
||||
|
||||
connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
|
||||
@ -4359,6 +4360,7 @@ void tst_QNetworkReply::ioPostToHttpUploadProgress()
|
||||
// create the request
|
||||
QUrl url = QUrl(QString("http://127.0.0.1:%1/").arg(server.serverPort()));
|
||||
QNetworkRequest request(url);
|
||||
request.setRawHeader("Content-Type", "application/octet-stream");
|
||||
QNetworkReplyPtr reply = manager.post(request, &sourceFile);
|
||||
QSignalSpy spy(reply, SIGNAL(uploadProgress(qint64,qint64)));
|
||||
connect(&server, SIGNAL(newConnection()), &QTestEventLoop::instance(), SLOT(exitLoop()));
|
||||
|
@ -430,6 +430,9 @@ void tst_QTcpServer::waitForConnectionTest()
|
||||
void tst_QTcpServer::setSocketDescriptor()
|
||||
{
|
||||
QTcpServer server;
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QTest::ignoreMessage(QtWarningMsg, "QSymbianSocketEngine::initialize - socket descriptor not found");
|
||||
#endif
|
||||
QVERIFY(!server.setSocketDescriptor(42));
|
||||
QCOMPARE(server.serverError(), QAbstractSocket::UnsupportedSocketOperationError);
|
||||
#ifndef Q_OS_SYMBIAN
|
||||
|
@ -13,7 +13,7 @@ vxworks:QT -= gui
|
||||
|
||||
symbian: {
|
||||
TARGET.EPOCHEAPSIZE="0x100 0x3000000"
|
||||
TARGET.CAPABILITY = NetworkServices
|
||||
TARGET.CAPABILITY = NetworkServices ReadUserData
|
||||
}
|
||||
|
||||
TARGET = tst_qtcpsocket
|
||||
|
@ -476,6 +476,9 @@ void tst_QTcpSocket::setInvalidSocketDescriptor()
|
||||
{
|
||||
QTcpSocket *socket = newSocket();
|
||||
QCOMPARE(socket->socketDescriptor(), -1);
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QTest::ignoreMessage(QtWarningMsg, "QSymbianSocketEngine::initialize - socket descriptor not found");
|
||||
#endif
|
||||
QVERIFY(!socket->setSocketDescriptor(-5, QTcpSocket::UnconnectedState));
|
||||
QCOMPARE(socket->socketDescriptor(), -1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user