Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties-preview.js

Issue 2954093003: [DevTools] Migrate inspector-protocol/runtime tests to new harness (Closed)
Patch Set: fail: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
+})

Powered by Google App Engine
This is Rietveld 408576698