summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptcontext
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-17 15:18:52 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-17 15:18:52 (GMT)
commita1ed3535882455cd30d46f338d9823452b53434e (patch)
treeef7dc6665e1f3e46753f54f8ce2cd058bbd7a7d1 /tests/auto/qscriptcontext
parent46a33725125f0b5408fd421ae8fd9f4c76a123ab (diff)
downloadQt-a1ed3535882455cd30d46f338d9823452b53434e.zip
Qt-a1ed3535882455cd30d46f338d9823452b53434e.tar.gz
Qt-a1ed3535882455cd30d46f338d9823452b53434e.tar.bz2
test default scope chain after a new context has been pushed
The scope chain should contain the activation object and the Global Object.
Diffstat (limited to 'tests/auto/qscriptcontext')
-rw-r--r--tests/auto/qscriptcontext/tst_qscriptcontext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
index 17d57a3..c09ebdb 100644
--- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
+++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
@@ -485,6 +485,9 @@ void tst_QScriptContext::pushAndPopContext()
QCOMPARE(ctx->activationObject().isObject(), true);
QCOMPARE(ctx->callee().isValid(), false);
QCOMPARE(ctx->thisObject().strictlyEquals(eng.globalObject()), true);
+ QCOMPARE(ctx->scopeChain().size(), 2);
+ QVERIFY(ctx->scopeChain().at(0).equals(ctx->activationObject()));
+ QVERIFY(ctx->scopeChain().at(1).equals(eng.globalObject()));
QScriptContext *ctx2 = eng.pushContext();
QCOMPARE(ctx2->parentContext(), ctx);