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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/show-generator-location.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
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/console-test.js"></script> 4 <script src="../../../http/tests/inspector/console-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 17 matching lines...) Expand all
28 { 28 {
29 var panel = WebInspector.panels.sources; 29 var panel = WebInspector.panels.sources;
30 30
31 function performStandardTestCase(pageExpression, next) 31 function performStandardTestCase(pageExpression, next)
32 { 32 {
33 InspectorTest.addSniffer(panel, "showUISourceCode", showUISourceCodeHook ); 33 InspectorTest.addSniffer(panel, "showUISourceCode", showUISourceCodeHook );
34 InspectorTest.evaluateInPage(pageExpression, didEvaluate); 34 InspectorTest.evaluateInPage(pageExpression, didEvaluate);
35 35
36 function didEvaluate(remote) 36 function didEvaluate(remote)
37 { 37 {
38 panel._showGeneratorLocation(remote); 38 remote.getOwnPropertiesPromise().then(revealLocation.bind(null, remo te));
39 }
40
41 function revealLocation(remote, properties)
42 {
43 var loc;
44 for (var prop of properties.internalProperties) {
45 if (prop.name === "[[GeneratorLocation]]") {
46 loc = prop.value.value;
47 break;
48 }
49 }
50 WebInspector.Revealer.reveal(remote.debuggerModel().createRawLocatio nByScriptId(loc.scriptId, loc.lineNumber, loc.columnNumber));
39 } 51 }
40 52
41 function showUISourceCodeHook(uiSourceCode, lineNumber, columnNumber, fo rceShowInPanel) 53 function showUISourceCodeHook(uiSourceCode, lineNumber, columnNumber, fo rceShowInPanel)
42 { 54 {
43 // lineNumber and columnNumber are 0-based 55 // lineNumber and columnNumber are 0-based
44 ++lineNumber; 56 ++lineNumber;
45 ++columnNumber; 57 ++columnNumber;
46 InspectorTest.addResult("Generator location revealed: [" + lineNumbe r + ":" + columnNumber + "]"); 58 InspectorTest.addResult("Generator location revealed: [" + lineNumbe r + ":" + columnNumber + "]");
47 next(); 59 next();
48 } 60 }
(...skipping 21 matching lines...) Expand all
70 82
71 </script> 83 </script>
72 </head> 84 </head>
73 85
74 <body onload="runTest()"> 86 <body onload="runTest()">
75 <p> 87 <p>
76 Tests that "Show Generator Location" jumps to the correct location. 88 Tests that "Show Generator Location" jumps to the correct location.
77 </p> 89 </p>
78 </body> 90 </body>
79 </html> 91 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698