blob: ac1c2e5e596b74f1aad06b046e8a6a067178c5bf [file] [log] [blame]
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/console-test.js"></script>
<script>
function test()
{
var commands = [
"{a:1, b:2}",
"{a:1}",
"{var a = 1; eval(\"{ a:1, b:2 }\");}",
"{ for (var i = 0; i < 5; ++i); }",
"{ a: 4 }),({ b: 7 }",
"{ let a = 4; a; }",
"{ let a = 4; }; { let b = 5; };",
"{ a: 4 } + { a: 5 }",
"{ a: 4 }, { a: 5 }",
// Test that detection doesn't incur side effects.
"var foo = 4;",
"{ a: foo++ }",
"foo;"
];
var current = -1;
loopOverCommands();
function loopOverCommands()
{
++current;
if (current < commands.length) {
InspectorTest.evaluateInConsole(commands[current], loopOverCommands);
} else {
InspectorTest.dumpConsoleMessagesIgnoreErrorStackFrames();
InspectorTest.completeTest();
}
}
}
</script>
</head>
<body onload="runTest()">
<p>
Tests that evaluating object literal in the console correctly reported.
</p>
</body>
</html>