aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-03 01:00:30 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-07-03 06:11:21 +0000
commit97aa001da97ee8531b3de4bd97496478b2f3f2e9 (patch)
tree62ff6e849ea545769c8e5f245eaa34531760a1a2 /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
parent71d4a62661f771f1ac900fab02840f7863a0deed (diff)
parent6dffa5400fd056e3862a2f8905362679c1bb6be7 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: .qmake.conf Change-Id: Icd05d016de5b4cf9af5234cb47b5c3fd0f6a053e
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp13
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 59dc5debb9..d06243897c 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();
@@ -8822,6 +8823,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;