winrt: Disable tests which connect to localhost
WinRT does not allow do connect to the localhost due to security constraints and sandboxing. Hence we need to disable those currently. Change-Id: Idb8c71397a41e5fa5bad9d618dba1bb389e71b9c Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>bb10
parent
e19fc4324b
commit
6c7c34f219
|
|
@ -1848,6 +1848,8 @@ void tst_QObject::moveToThread()
|
|||
thread.wait();
|
||||
}
|
||||
|
||||
// WinRT does not allow connection to localhost
|
||||
#ifndef Q_OS_WINRT
|
||||
{
|
||||
// make sure socket notifiers are moved with the object
|
||||
MoveToThreadThread thread;
|
||||
|
|
@ -1883,6 +1885,7 @@ void tst_QObject::moveToThread()
|
|||
QMetaObject::invokeMethod(socket, "deleteLater", Qt::QueuedConnection);
|
||||
thread.wait();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -131,6 +131,10 @@ signals:
|
|||
|
||||
void tst_QSocketNotifier::unexpectedDisconnection()
|
||||
{
|
||||
#ifdef Q_OS_WINRT
|
||||
// WinRT does not allow a connection to the localhost
|
||||
QSKIP("Local connection not allowed", SkipAll);
|
||||
#else
|
||||
/*
|
||||
Given two sockets and two QSocketNotifiers registered on each
|
||||
their socket. If both sockets receive data, and the first slot
|
||||
|
|
@ -196,6 +200,7 @@ void tst_QSocketNotifier::unexpectedDisconnection()
|
|||
writeEnd1->close();
|
||||
writeEnd2->close();
|
||||
server.close();
|
||||
#endif // !Q_OS_WINRT
|
||||
}
|
||||
|
||||
class MixingWithTimersHelper : public QObject
|
||||
|
|
@ -234,6 +239,9 @@ void MixingWithTimersHelper::socketFired()
|
|||
|
||||
void tst_QSocketNotifier::mixingWithTimers()
|
||||
{
|
||||
#ifdef Q_OS_WINRT
|
||||
QSKIP("WinRT does not allow connection to localhost", SkipAll);
|
||||
#else
|
||||
QTimer timer;
|
||||
timer.setInterval(0);
|
||||
timer.start();
|
||||
|
|
@ -258,6 +266,7 @@ void tst_QSocketNotifier::mixingWithTimers()
|
|||
|
||||
QCOMPARE(helper.timerActivated, true);
|
||||
QTRY_COMPARE(helper.socketActivated, true);
|
||||
#endif // !Q_OS_WINRT
|
||||
}
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
|
|
|
|||
Loading…
Reference in New Issue