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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-minified-variables-evalution.html

Issue 1770263002: Devtools: resolve expressions in minified scripts with sourcemaps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 9 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 src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script src="resources/resolve-expressions-compressed.js"></script>
6 <script>
7 function test()
8 {
9 Runtime.experiments.enableForTest("resolveVariableNames");
10 InspectorTest.startDebuggerTest(step1);
11
12 function step1()
13 {
14 InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
15 }
16
17 function step2()
18 {
19 InspectorTest.waitForScriptSource("resolve-expressions-origin.js", step3 )
20 }
21
22 function step3(uiSourceCode)
23 {
24 var positions = [
25 new Position(7, 11, 23, "object.prop1"),
26 new Position(4, 4, 14, "this.prop2"),
27 new Position(5, 4, 19, "object[\"prop3\"]"),
28 new Position(2, 8, 14, "object"), //object
29 ];
30 var promise = Promise.resolve();
31 for (var position of positions)
32 promise = promise.then(testAtPosition.bind(null, uiSourceCode, posit ion));
33
34 promise.then(() => InspectorTest.completeDebuggerTest());
35 }
36
37 function Position(line, startColumn, endColumn, originText)
38 {
39 this.line = line;
40 this.startColumn = startColumn;
41 this.endColumn = endColumn;
42 this.originText = originText;
43 }
44
45 function testAtPosition(uiSourceCode, position)
46 {
47 return WebInspector.SourceMapNamesResolver.resolveExpression(InspectorTe st.debuggerModel.selectedCallFrame(), position.originText, uiSourceCode, positio n.line, position.startColumn, position.endColumn)
48 .then(InspectorTest.evaluateOnCurrentCallFrame)
49 .then(remoteObject => InspectorTest.addResult(remoteObject.descripti on));
50 }
51 }
52
53 </script>
54 </head>
55
56 <body onload="runTest()">
57 <p>
58 Tests evaluation in minified scripts.
59 </p>
60 </body>
61 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698