aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qquickworkerscript
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-09-06 10:39:42 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-09-06 10:39:51 +0200
commit68607aeeeb6ba84b843a0e3d848a5438a36f55a7 (patch)
treef7ff7ef369e079599d8be73f909498aeb6e75201 /tests/auto/qml/qquickworkerscript
parenta719e348d22b1ce158a7b2be878965ac3a258914 (diff)
parent42f58e557034bb95005db465f078212cfc1b693a (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Diffstat (limited to 'tests/auto/qml/qquickworkerscript')
-rw-r--r--tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp
index f4765d0e8d..8ad2b6ba2b 100644
--- a/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp
+++ b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp
@@ -338,19 +338,17 @@ void tst_QQuickWorkerScript::script_global()
delete worker;
}
+ qquickworkerscript_lastWarning = QString();
+
{
+ QtMessageHandler previousMsgHandler = qInstallMessageHandler(qquickworkerscript_warningsHandler);
+
QQmlComponent component(&m_engine, testFileUrl("worker_global2.qml"));
QQuickWorkerScript *worker = qobject_cast<QQuickWorkerScript*>(component.create());
QVERIFY(worker != 0);
- QString value("Hello");
-
- QtMessageHandler previousMsgHandler = qInstallMessageHandler(qquickworkerscript_warningsHandler);
-
- QVERIFY(QMetaObject::invokeMethod(worker, "testSend", Q_ARG(QVariant, value)));
-
QTRY_COMPARE(qquickworkerscript_lastWarning,
- testFileUrl("script_global.js").toString() + QLatin1String(":2: Invalid write to global property \"world\""));
+ testFileUrl("script_global2.js").toString() + QLatin1String(":1: Invalid write to global property \"world\""));
qInstallMessageHandler(previousMsgHandler);