aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger/qqmldebugclient
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-08-10 16:06:49 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-10-15 08:20:50 +0000
commit1a123472ba0e56d1fd772db430e6d4532f672a6e (patch)
tree6f63f7b63c42b6bb7eed9a57a379159fd0e6fde8 /tests/auto/qml/debugger/qqmldebugclient
parent36cbf6a62aec4de253e935291bdd33370e7b7faa (diff)
Test enabling/disabling of combinations of debug services.
This tests the new QQmlDebuggingEnabler::setServices() method. Change-Id: I29b588fa425a8e3230c451d6ff73a1bde104bfc4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tests/auto/qml/debugger/qqmldebugclient')
-rw-r--r--tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp b/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp
index 6fc6c6a914..abdc2483ea 100644
--- a/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp
+++ b/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp
@@ -68,10 +68,20 @@ private slots:
void tst_QQmlDebugClient::initTestCase()
{
QQmlDebugConnector::setPluginKey(QLatin1String("QQmlDebugServer"));
+ QQmlDebugConnector::setServices(QStringList()
+ << QStringLiteral("tst_QQmlDebugClient::handshake()"));
QTest::ignoreMessage(QtWarningMsg,
"QML debugger: Cannot set plugin key after loading the plugin.");
m_service = new QQmlDebugTestService("tst_QQmlDebugClient::handshake()");
+
+ foreach (const QString &service, QQmlDebuggingEnabler::debuggerServices())
+ QCOMPARE(QQmlDebugConnector::instance()->service(service), (QQmlDebugService *)0);
+ foreach (const QString &service, QQmlDebuggingEnabler::inspectorServices())
+ QCOMPARE(QQmlDebugConnector::instance()->service(service), (QQmlDebugService *)0);
+ foreach (const QString &service, QQmlDebuggingEnabler::profilerServices())
+ QCOMPARE(QQmlDebugConnector::instance()->service(service), (QQmlDebugService *)0);
+
const QString waitingMsg = QString("QML Debugger: Waiting for connection on port %1...").arg(PORT);
QTest::ignoreMessage(QtDebugMsg, waitingMsg.toLatin1().constData());
QQmlDebuggingEnabler::startTcpDebugServer(PORT);