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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/function-generator-details.html

Issue 2112673003: [DevTools] Move suspended generator location to internal properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/function-generator-details-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 src="../../../http/tests/inspector/debugger-test.js"></script> 4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script> 5 <script>
6 6
7 function forward(iter, step) 7 function forward(iter, step)
8 { 8 {
9 while (step-- > 0) 9 while (step-- > 0)
10 iter.next(); 10 iter.next();
(...skipping 24 matching lines...) Expand all
35 35
36 var anonymousGenIter = (function*() { 36 var anonymousGenIter = (function*() {
37 yield 21; 37 yield 21;
38 yield 22; 38 yield 22;
39 yield 23; 39 yield 23;
40 })(); 40 })();
41 forward(anonymousGenIter, 3); 41 forward(anonymousGenIter, 3);
42 42
43 function test() 43 function test()
44 { 44 {
45 function dumpGeneratorObjectDetails(details)
46 {
47 InspectorTest.addResult("functionName: \"" + details.functionName + "\"" );
48 InspectorTest.addResult("lineNumber: " + (details.location.lineNumber + 1));
49 InspectorTest.addResult("columnNumber: " + details.location.columnNumber );
50 InspectorTest.addResult("scriptId is valid: " + !!details.location.scrip tId);
51 InspectorTest.addResult("status: " + details.status);
52 }
53
54 function performStandardTestCase(pageExpression, next) 45 function performStandardTestCase(pageExpression, next)
55 { 46 {
56 InspectorTest.evaluateInPage(pageExpression, didEvaluate); 47 InspectorTest.evaluateInPage(pageExpression, didEvaluate);
57 48
58 function didEvaluate(remote) 49 function didEvaluate(remote)
59 { 50 {
60 InspectorTest.addResult(pageExpression + ": type = " + remote.type + ", subtype = " + remote.subtype); 51 InspectorTest.addResult(pageExpression + ": type = " + remote.type + ", subtype = " + remote.subtype);
61 InspectorTest.DebuggerAgent.getGeneratorObjectDetails(remote.objectI d, didGetDetails); 52 remote.getOwnPropertiesPromise().then(dumpInternalProperties);
62 } 53 }
63 54
64 function didGetDetails(error, response) 55 function dumpInternalProperties(properties)
65 { 56 {
66 InspectorTest.assertTrue(!error, "FAIL: " + error); 57 InspectorTest.assertTrue(properties && properties.internalProperties , "FAIL: no properties");
67 dumpGeneratorObjectDetails(response); 58 for (var prop of properties.internalProperties) {
59 if (prop.name !== "[[GeneratorLocation]]")
60 InspectorTest.addResult(prop.name + " = " + prop.value.descr iption);
61 else
62 dumpLocation(prop.value.value);
63 }
68 next(); 64 next();
69 } 65 }
66
67 function dumpLocation(location)
68 {
69 InspectorTest.addResult("lineNumber = " + location.lineNumber);
70 InspectorTest.addResult("columnNumber = " + location.columnNumber);
71 InspectorTest.addResult("script is valid: " + (location.scriptId ? " yes" : "no"));
72 }
70 } 73 }
71 74
72 var expressions = [ 75 var expressions = [
73 "iterNotStarted", 76 "iterNotStarted",
74 "iterSuspended", 77 "iterSuspended",
75 "iterClosed", 78 "iterClosed",
76 "iterObjGenerator", 79 "iterObjGenerator",
77 "anonymousGenIter", 80 "anonymousGenIter",
78 ]; 81 ];
79 82
(...skipping 12 matching lines...) Expand all
92 </script> 95 </script>
93 96
94 </head> 97 </head>
95 98
96 <body onload="runTest()"> 99 <body onload="runTest()">
97 <p> 100 <p>
98 Tests that Debugger.getGeneratorObjectDetails command returns correct result. 101 Tests that Debugger.getGeneratorObjectDetails command returns correct result.
99 </p> 102 </p>
100 </body> 103 </body>
101 </html> 104 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/function-generator-details-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698