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

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

Issue 2899163002: DevTools: Promisify Runtime domain (Closed)
Patch Set: addressing comments 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 unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script> 4 <script>
5 5
6 var object1 = { get foo() { return 1; }, set foo(value) { } }; 6 var object1 = { get foo() { return 1; }, set foo(value) { } };
7 var object2 = { get foo() { return 1; } }; 7 var object2 = { get foo() { return 1; } };
8 8
9 function test() 9 function test()
10 { 10 {
11 var obj1, obj2; 11 var obj1, obj2;
12 12
13 function dumpProperties(next, properties) 13 function dumpProperties(next, properties)
14 { 14 {
15 for (var i = 0; i < properties.length; ++i) 15 for (var i = 0; i < properties.length; ++i)
16 dumpProperty(properties[i]); 16 dumpProperty(properties[i]);
17 next(); 17 next();
18 } 18 }
19 19
20 InspectorTest.runTestSuite([ 20 InspectorTest.runTestSuite([
21 function testSetUp(next) 21 async function testSetUp(next)
22 { 22 {
23 InspectorTest.evaluateInPage("dumpObjects('Initial')", step0); 23 await new Promise(resolve => InspectorTest.evaluateInPage("dumpObjec ts('Initial')", resolve));
24 24
25 function step0() 25 var result = await InspectorTest.RuntimeAgent.evaluate("object1");
26 {
27 InspectorTest.RuntimeAgent.evaluate("object1", step1);
28 }
29 26
30 function step1(error, result, exceptionDetails) 27 obj1 = InspectorTest.runtimeModel.createRemoteObject(result);
31 { 28 var result = await InspectorTest.RuntimeAgent.evaluate("object2");
32 obj1 = InspectorTest.runtimeModel.createRemoteObject(result);
33 InspectorTest.RuntimeAgent.evaluate("object2", step2);
34 }
35 29
36 function step2(error, result, exceptionDetails) 30 obj2 = InspectorTest.runtimeModel.createRemoteObject(result);
37 { 31 next();
38 obj2 = InspectorTest.runtimeModel.createRemoteObject(result);
39 next();
40 }
41 }, 32 },
42 33
43 function testGetterAndSetter(next) 34 function testGetterAndSetter(next)
44 { 35 {
45 obj1.getOwnProperties(false, dumpProperties.bind(this, next)); 36 obj1.getOwnProperties(false, dumpProperties.bind(this, next));
46 }, 37 },
47 38
48 function testGetterOnly(next) 39 function testGetterOnly(next)
49 { 40 {
50 obj2.getOwnProperties(false, dumpProperties.bind(this, next)); 41 obj2.getOwnProperties(false, dumpProperties.bind(this, next));
(...skipping 22 matching lines...) Expand all
73 </script> 64 </script>
74 </head> 65 </head>
75 66
76 <body onload="runTest()"> 67 <body onload="runTest()">
77 <p> 68 <p>
78 Tests RemoteObject.getProperties. 69 Tests RemoteObject.getProperties.
79 </p> 70 </p>
80 71
81 </body> 72 </body>
82 </html> 73 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698