diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2016-10-13 14:39:47 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-10-13 14:40:30 +0200 |
commit | 042640042491106a2f5cbb6a93bbf8c0cade0b9d (patch) | |
tree | 259e412414fc86508b4c066a928d7b01c3d3a0b6 /tests/auto/qml/qjsengine | |
parent | 6df6c10e1af827d06a387e7422176dd310cf83be (diff) | |
parent | f720242419cd73529277173e43e9f7a8ed367ad3 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.8
Change-Id: I175b27337b534c0b8f46a4a792d2c43cde73ffc4
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 52379a29a4..479584af54 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -191,6 +191,7 @@ private slots: void v4FunctionWithoutQML(); void withNoContext(); + void holeInPropertyData(); signals: void testSignal(); @@ -4013,6 +4014,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" |