summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@theqtcompany.com>2016-02-16 08:47:51 +0100
committerMaurice Kalinowski <maurice.kalinowski@theqtcompany.com>2016-02-16 19:35:10 +0000
commit6c7c34f219b6d156428d3fae79a09a2c68814ce6 (patch)
tree6e858d151b64292d000285a5530185b186083a6c
parente19fc4324b9c4dd7ef5519894f8eedb3703cb39d (diff)
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>
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp3
-rw-r--r--tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp9
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index f7c1f03c0f..0d43b09d6b 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -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
}
diff --git a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp
index f49da1f5a8..95e924bd77 100644
--- a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp
+++ b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp
@@ -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