diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-07-01 01:00:48 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-07-01 10:29:06 +0200 |
commit | e6c6cc8fde26bd0b9d37a1812593f17df0b4159a (patch) | |
tree | 6aae6724e24a1e051d271e5f67baab5acc358313 /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | |
parent | 16289f35eb08a9b9a6d56ea8dec549b1f17e4daf (diff) | |
parent | 3ecec55e534214aced70ccab7cc929cfb57738a2 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/imports/imports.pro
src/qml/qml/qqmlmetatype.cpp
Change-Id: I308436caf55402cb2246cb591c6ac8f83e1febf8
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 5b73ffbe1d..d9b9c91365 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -370,6 +370,7 @@ private slots: void undefinedPropertiesInObjectWrapper(); void hugeRegexpQuantifiers(); void singletonTypeWrapperLookup(); + void getThisObject(); private: // static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter); @@ -9057,6 +9058,17 @@ void tst_qqmlecmascript::singletonTypeWrapperLookup() QCOMPARE(test->property("secondLookup").toInt(), singleton2->testVar); } +void tst_qqmlecmascript::getThisObject() +{ + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("getThis.qml")); + QVERIFY(component.isReady()); + QScopedPointer<QObject> test(component.create()); + QVERIFY(!test.isNull()); + + QTRY_COMPARE(qvariant_cast<QObject *>(test->property("self")), test.data()); +} + QTEST_MAIN(tst_qqmlecmascript) #include "tst_qqmlecmascript.moc" |