From a1ed3535882455cd30d46f338d9823452b53434e Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 17 Aug 2009 17:18:52 +0200 Subject: test default scope chain after a new context has been pushed The scope chain should contain the activation object and the Global Object. --- tests/auto/qscriptcontext/tst_qscriptcontext.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- cgit v0.12