V4 debugging: Fix instable test.
authorErik Verbruggen <erik.verbruggen@me.com>
Thu, 14 Nov 2013 11:04:59 +0000 (12:04 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 14 Nov 2013 11:12:40 +0000 (12:12 +0100)
Request the scripts after hitting a breakpoint. The reason this test
could fail before, is that the engine might be calling into the debugger
even before any script was loaded.

Change-Id: Iba49f445ab97afaf2bb168b04063432ca2f9dddd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp

index fb6b4ee..2cf6ee9 100644 (file)
@@ -1454,9 +1454,9 @@ void tst_QQmlDebugJS::getScripts()
 
     QVERIFY(init());
 
+    client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QString(TEST_QMLFILE), 48, -1, true);
     client->connect();
-    client->interrupt();
-    QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(interruptRequested())));
+    QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped())));
 
     client->scripts();
     QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(scriptsResult())));