summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptcontext
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-14 14:20:56 +0200
committerKent Hansen <khansen@trolltech.com>2009-08-14 14:20:56 +0200
commit4c31f59d45130eae8f140e6d0177a4b227454187 (patch)
treef03c06fc796c7ae254c342d4016ef13f5c0a3c5e /tests/auto/qscriptcontext
parente0a86dc604b87921652b844a5f85889bb6291ed9 (diff)
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/qscriptcontext')
-rw-r--r--tests/auto/qscriptcontext/tst_qscriptcontext.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
index 6401f62e71..36c680dd3b 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;