1 <p>This tests verifies the scope of a function's name.
3 <pre id=
"console"></pre>
8 document
.getElementById("console").appendChild(document
.createTextNode(s
+ "\n"));
11 function shouldBe(a
, aDescription
, b
)
14 log("PASS: " + aDescription
+ " should be " + b
+ " and is.");
17 log("FAIL: " + aDescription
+ " should be " + b
+ " but instead is " + a
+ ".");
20 if (window
.testRunner
) {
21 testRunner
.dumpAsText();
24 // Function declarations do not put the function's name in scope.
43 // Function expressions do put the function's name in scope, as a read-only property.
54 g
== arguments
.callee
,
55 "g == arguments.callee",