| Index: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties-preview.js
|
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties-preview.js b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties-preview.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9707bb4b4ee5691ce1f7f3df0ad9dd80c59e496f
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties-preview.js
|
| @@ -0,0 +1,19 @@
|
| +(async function(testRunner) {
|
| + let {page, session, dp} = await testRunner.startBlank(``);
|
| +
|
| + function printResult(response) {
|
| + for (var property of response.result.result) {
|
| + if (!property.value || property.name === '__proto__')
|
| + continue;
|
| + if (property.value.preview)
|
| + testRunner.log(property.name + ' : ' + JSON.stringify(property.value.preview, null, 4));
|
| + else
|
| + testRunner.log(property.name + ' : ' + property.value.description);
|
| + }
|
| + }
|
| +
|
| + var response = await dp.Runtime.evaluate({expression: `({p1: {a:1}, p2: {b:'foo', bb:'bar'}})`});
|
| + printResult(await dp.Runtime.getProperties({objectId: response.result.result.objectId, ownProperties: true }));
|
| + printResult(await dp.Runtime.getProperties({objectId: response.result.result.objectId, ownProperties: true, generatePreview: true }));
|
| + testRunner.completeTest();
|
| +})
|
|
|