diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-14 12:20:56 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-14 12:20:56 (GMT) |
commit | 4c31f59d45130eae8f140e6d0177a4b227454187 (patch) | |
tree | f03c06fc796c7ae254c342d4016ef13f5c0a3c5e /tests/auto | |
parent | e0a86dc604b87921652b844a5f85889bb6291ed9 (diff) | |
download | Qt-4c31f59d45130eae8f140e6d0177a4b227454187.zip Qt-4c31f59d45130eae8f140e6d0177a4b227454187.tar.gz Qt-4c31f59d45130eae8f140e6d0177a4b227454187.tar.bz2 |
make sure QScriptContext::scopeChain() returns the right object
Follow-up to commit e0a86dc604b87921652b844a5f85889bb6291ed9.
Just like in the activationObject() function, we need to check if
the activation object is actually a proxy to another object, and
return that other object if that's the case (the proxy object should
not be exposed to the public).
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qscriptcontext/tst_qscriptcontext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp index 6401f62..36c680d 100644 --- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp +++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp @@ -719,6 +719,8 @@ void tst_QScriptContext::getSetActivationObject() QScriptValue obj = eng.newObject(); ctx->setActivationObject(obj); QVERIFY(ctx->activationObject().equals(obj)); + QCOMPARE(ctx->scopeChain().size(), 1); + QVERIFY(ctx->scopeChain().at(0).equals(obj)); { QScriptEngine eng2; |