Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-protocol / runtime / runtime-getProperties-preview.html
blobc825b85615544682190d54f0c1e89ebcb7f51ace
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
4 <script>
6 function test()
8 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "({p1: {a:1}, p2: {b:'foo', bb:'bar'}})" }, callbackEvaluate);
10 function callbackEvaluate(result)
12 InspectorTest.sendCommand("Runtime.getProperties", { "objectId": result.result.result.objectId, "ownProperties": true }, callbackGetProperties.bind(null, false));
13 InspectorTest.sendCommand("Runtime.getProperties", { "objectId": result.result.result.objectId, "ownProperties": true, "generatePreview": true }, callbackGetProperties.bind(null, true));
16 function callbackGetProperties(completeTest, result)
18 for (var property of result.result.result) {
19 if (!property.value || property.name === "__proto__")
20 continue;
21 if (property.value.preview)
22 InspectorTest.log(property.name + " : " + JSON.stringify(property.value.preview, null, 4));
23 else
24 InspectorTest.log(property.name + " : " + property.value.description);
26 if (completeTest)
27 InspectorTest.completeTest();
30 </script>
31 </head>
32 <body onLoad="runTest();">
33 </body>
34 </html>