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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties-preview.html

Issue 2954093003: [DevTools] Migrate inspector-protocol/runtime tests to new harness (Closed)
Patch Set: fail: Created 3 years, 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource s/inspector-protocol-test.js"></script>
4 <script>
5
6 function test()
7 {
8 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "({p1: {a:1}, p2: {b:'foo', bb:'bar'}})" }, callbackEvaluate);
9
10 function callbackEvaluate(result)
11 {
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 }, callba ckGetProperties.bind(null, true));
14 }
15
16 function callbackGetProperties(completeTest, result)
17 {
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(propert y.value.preview, null, 4));
23 else
24 InspectorTest.log(property.name + " : " + property.value.descrip tion);
25 }
26 if (completeTest)
27 InspectorTest.completeTest();
28 }
29 }
30 </script>
31 </head>
32 <body onLoad="runTest();">
33 </body>
34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698