From abca09bf725040f45d64cfa9b2ea83f2eef405df Mon Sep 17 00:00:00 2001 From: "pschwartau%netscape.com" Date: Tue, 20 Feb 2001 22:11:44 +0000 Subject: [PATCH] Revising error in test. See bug 69441, where this was pointed out - git-svn-id: svn://10.0.0.236/trunk@87478 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/tests/js1_5/Regress/regress-68498-004.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mozilla/js/tests/js1_5/Regress/regress-68498-004.js b/mozilla/js/tests/js1_5/Regress/regress-68498-004.js index a2f1e7d0864..6e60d4db0b6 100644 --- a/mozilla/js/tests/js1_5/Regress/regress-68498-004.js +++ b/mozilla/js/tests/js1_5/Regress/regress-68498-004.js @@ -24,19 +24,20 @@ * * See http://bugzilla.mozilla.org/show_bug.cgi?id=68498 * See http://bugzilla.mozilla.org/showattachment.cgi?attach_id=25251 +* See http://bugzilla.mozilla.org/show_bug.cgi?id=69441 (!!!) * * Brendan: * * "ECMA-262 Edition 3, 10.1.3 requires a FunctionDeclaration parsed as part * of a Program by eval to create a property of eval's caller's variable object. -* This test evals in the body of a with statement, whose scope chain is not +* This test evals in the body of a with statement, whose scope chain *is* * relevant to the effect of parsing the FunctionDeclaration." */ //------------------------------------------------------------------------------------------------- var bug = 68498; var summary = 'Testing self.eval(str) inside a function'; -var statprefix = '; currently at statement '; -var statsuffix = ' within test -'; +var statprefix = '; currently at expect['; +var statsuffix = '] within test -'; var sToEval=''; var actual=[ ]; var expect=[ ]; @@ -53,7 +54,7 @@ function f(o,s,x) {with(o) eval(s); return z;}; // Run-time statements to pass to the eval inside f sToEval += 'actual[0] = typeof g;' -sToEval += 'function g(){actual[1]=(typeof w); return x};' +sToEval += 'function g(){actual[1]=(typeof w == "undefined" || w); return x};' sToEval += 'actual[2] = w;' sToEval += 'actual[3] = typeof g;' sToEval += 'var z=g();' @@ -77,7 +78,7 @@ actual[5] = 'z' in self && z; * this far up the scope chain to find x...therefore we expect 'inner' */ expect[0] = 'function'; -expect[1] = 'undefined'; +expect[1] = 44; expect[2] = 44; expect[3] = 'function'; expect[4] = 'inner';