blob: 0a2d599c71f61e63f1ddb0c3e635b7be08db53b5 [file] [log] [blame]
<p>This test verifies that var declarations in different evaluation units don't stomp each other.</p>
<pre id="console"></pre>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(s)
{
document.getElementById("console").appendChild(document.createTextNode(s + "\n"));
}
</script>
<script>
var x = 1;
y = 1;
</script>
<script>
var x;
var y;
if (x == 1)
log("PASS: x should be 1 and is.");
else
log("FAIL: x should be 1 but instead is " + x + ".");
if (y == 1)
log("PASS: y should be 1 and is.");
else
log("FAIL: y should be 1 but instead is " + y + ".");
</script>