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-04 13:32:18 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-04 13:32:18 +0200
commit07205972ca9c6f5688a8fe261155989c130f8d9b (patch)
tree53c99681d6d6049e3f3f7a751ad6aa3589853d66 /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
parent341ab7708049b1a3f559b76f16393e688951a938 (diff)
parent47b2cde5dcca49a1969a43b294931323eff68f74 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: .qmake.conf Change-Id: I20ad6f8a260f387a3b73566a32c35a5772b401a5
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 d9b9c91365..b1a1ed4dec 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();
@@ -8843,6 +8844,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;