diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-12 20:49:36 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-12 20:49:45 +0200 |
commit | b4cdfc4a12d2b9ebc79fe17a2f1aff67bd940d71 (patch) | |
tree | e7841ee2695a3ef180e186d2df971c8fc207d0f9 /tests/auto/qml/qjsengine | |
parent | 650b5db06b057abe2db40fb8d56223e17ba8c06a (diff) | |
parent | af002b8df9b084fd7f26e9eead9844aab36bdc4d (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: Ib31008e593442ca5813fb14ae6b02f7ab2577395
Diffstat (limited to 'tests/auto/qml/qjsengine')
-rw-r--r-- | tests/auto/qml/qjsengine/tst_qjsengine.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp index 13bfa16581..63fefbe9f1 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -190,6 +190,7 @@ private slots: void v4FunctionWithoutQML(); void withNoContext(); + void holeInPropertyData(); signals: void testSignal(); @@ -3862,6 +3863,19 @@ void tst_QJSEngine::withNoContext() engine.evaluate("with (noContext) true"); } +void tst_QJSEngine::holeInPropertyData() +{ + QJSEngine engine; + QJSValue ok = engine.evaluate( + "var o = {};\n" + "o.bar = 0xcccccccc;\n" + "o.foo = 0x55555555;\n" + "Object.defineProperty(o, 'bar', { get: function() { return 0xffffffff }});\n" + "o.bar === 0xffffffff && o.foo === 0x55555555;"); + QVERIFY(ok.isBool()); + QVERIFY(ok.toBool()); +} + QTEST_MAIN(tst_QJSEngine) #include "tst_qjsengine.moc" |