diff options
author | Aurindam Jana <aurindam.jana@nokia.com> | 2011-12-15 10:54:45 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-15 12:17:16 +0100 |
commit | b6291c914d9a6f24dbfb0e92e8caedae889b709b (patch) | |
tree | 78275129a9605dce897346d28f0dcbe0cfe2b488 /tests/auto/declarative/debugger | |
parent | a401d0756f6ac3cee5597d5528515061326c3bfa (diff) |
QV8DebugService: add version command
Version command to retrieve debugger version info.
Change-Id: I711e2a3d639c648cef50498fe5bbb9b6b8c6c1fe
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'tests/auto/declarative/debugger')
-rw-r--r-- | tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp b/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp index 0f9da032e8..f2c028219e 100644 --- a/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp +++ b/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp @@ -174,6 +174,7 @@ private slots: void connect(); void interrupt(); void breakAfterCompile(); + void getDebuggerVersion(); void getVersion(); void getVersionWhenAttaching(); @@ -270,6 +271,7 @@ public: void connect(); void interrupt(); void breakAfterCompile(bool enabled); + void debuggerVersion(); void continueDebugging(StepAction stepAction, int stepCount = 1); void evaluate(QString expr, bool global = false, bool disableBreak = false, int frame = -1, const QVariantMap &addContext = QVariantMap()); @@ -301,6 +303,7 @@ signals: void connected(); void interruptRequested(); void breakAfterCompileRequested(); + void gotVersion(); void result(); void stopped(); @@ -339,6 +342,11 @@ void QJSDebugClient::breakAfterCompile(bool enabled) sendMessage(packMessage(BREAKAFTERCOMPILE, request)); } +void QJSDebugClient::debuggerVersion() +{ + sendMessage(packMessage(VERSION)); +} + void QJSDebugClient::continueDebugging(StepAction action, int count) { // { "seq" : <number>, @@ -951,6 +959,8 @@ void QJSDebugClient::messageReceived(const QByteArray &data) } else if (type == BREAKAFTERCOMPILE) { emit breakAfterCompileRequested(); + } else if (type == VERSION) { + emit gotVersion(); } } } @@ -1079,6 +1089,17 @@ void tst_QDeclarativeDebugJS::breakAfterCompile() QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(stopped()))); } +void tst_QDeclarativeDebugJS::getDebuggerVersion() +{ + QVERIFY(init()); + client->debuggerVersion(); + + QVERIFY(QDeclarativeDebugTest::waitForSignal(client, SIGNAL(gotVersion()))); + + QString version(client->response); + QCOMPARE(version, QLatin1String("1.1")); +} + void tst_QDeclarativeDebugJS::getVersion() { //void version() |