diff options
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index b1cf8c905f..f4641145ab 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -307,6 +307,7 @@ private slots: void numberParsing(); void stringParsing(); void qtbug_32801(); + void thisObject(); private: // static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter); @@ -7311,6 +7312,15 @@ void tst_qqmlecmascript::qtbug_32801() QVERIFY(QMetaObject::invokeMethod(obj.data(), "emitTestSignal")); } +void tst_qqmlecmascript::thisObject() +{ + QQmlComponent component(&engine, testFileUrl("thisObject.qml")); + QObject *object = component.create(); + QVERIFY(object); + QCOMPARE(qvariant_cast<QObject*>(object->property("subObject"))->property("test").toInt(), 2); + delete object; +} + QTEST_MAIN(tst_qqmlecmascript) #include "tst_qqmlecmascript.moc" |