summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-17 17:18:52 +0200
committerKent Hansen <khansen@trolltech.com>2009-08-17 17:18:52 +0200
commita1ed3535882455cd30d46f338d9823452b53434e (patch)
treeef7dc6665e1f3e46753f54f8ce2cd058bbd7a7d1 /tests/auto/qscriptcontext/tst_qscriptcontext.cpp
parent46a33725125f0b5408fd421ae8fd9f4c76a123ab (diff)
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/tst_qscriptcontext.cpp')
-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 17d57a391a..c09ebdb6ba 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);