blob: c825b85615544682190d54f0c1e89ebcb7f51ace [file] [log] [blame]
<html>
<head>
<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
<script>
function test()
{
InspectorTest.sendCommand("Runtime.evaluate", { "expression": "({p1: {a:1}, p2: {b:'foo', bb:'bar'}})" }, callbackEvaluate);
function callbackEvaluate(result)
{
InspectorTest.sendCommand("Runtime.getProperties", { "objectId": result.result.result.objectId, "ownProperties": true }, callbackGetProperties.bind(null, false));
InspectorTest.sendCommand("Runtime.getProperties", { "objectId": result.result.result.objectId, "ownProperties": true, "generatePreview": true }, callbackGetProperties.bind(null, true));
}
function callbackGetProperties(completeTest, result)
{
for (var property of result.result.result) {
if (!property.value || property.name === "__proto__")
continue;
if (property.value.preview)
InspectorTest.log(property.name + " : " + JSON.stringify(property.value.preview, null, 4));
else
InspectorTest.log(property.name + " : " + property.value.description);
}
if (completeTest)
InspectorTest.completeTest();
}
}
</script>
</head>
<body onLoad="runTest();">
</body>
</html>