24 lines
466 B
HTML
24 lines
466 B
HTML
<p>This test verifies var declarations inside a function don't stomp function arguments.</p>
|
|
|
|
<pre id="console"></pre>
|
|
|
|
<script>
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
|
|
function log(s)
|
|
{
|
|
document.getElementById("console").appendChild(document.createTextNode(s + "\n"));
|
|
}
|
|
|
|
function f(x)
|
|
{
|
|
var x;
|
|
if (x == 1)
|
|
log("PASS: x should be 1 and is.");
|
|
else
|
|
log("FAIL: x should be 1 but instead is " + x + ".");
|
|
}
|
|
f(1);
|
|
</script>
|