diff options
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 18ff10b6f4..15bd9584df 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -356,6 +356,7 @@ private slots: void callPropertyOnUndefined(); void jumpStrictNotEqualUndefined(); void removeBindingsWithNoDependencies(); + void preserveBindingWithUnresolvedNames(); void temporaryDeadZone(); void importLexicalVariables_data(); void importLexicalVariables(); @@ -8815,6 +8816,18 @@ void tst_qqmlecmascript::removeBindingsWithNoDependencies() } +void tst_qqmlecmascript::preserveBindingWithUnresolvedNames() +{ + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("preserveBindingWithUnresolvedNames.qml")); + QScopedPointer<QObject> object(component.create()); + QVERIFY(!object.isNull()); + QCOMPARE(object->property("testTypeOf").toString(), QString("undefined")); + QObject obj; + engine.rootContext()->setContextProperty("contextProp", &obj); + QCOMPARE(object->property("testTypeOf").toString(), QString("object")); +} + void tst_qqmlecmascript::temporaryDeadZone() { QJSEngine engine; |