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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-minified-variables-evalution.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-minified-variables-evalution.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-minified-variables-evalution.html
new file mode 100644
index 0000000000000000000000000000000000000000..4cc9cd2b2a2cca4ba25225a7aac6c6ce5f2c8bb7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-minified-variables-evalution.html
@@ -0,0 +1,61 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script src="resources/resolve-expressions-compressed.js"></script>
+<script>
+function test()
+{
+ Runtime.experiments.enableForTest("resolveVariableNames");
+ InspectorTest.startDebuggerTest(step1);
+
+ function step1()
+ {
+ InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
+ }
+
+ function step2()
+ {
+ InspectorTest.waitForScriptSource("resolve-expressions-origin.js", step3)
+ }
+
+ function step3(uiSourceCode)
+ {
+ var positions = [
+ new Position(7, 11, 23, "object.prop1"),
+ new Position(4, 4, 14, "this.prop2"),
+ new Position(5, 4, 19, "object[\"prop3\"]"),
+ new Position(2, 8, 14, "object"), //object
+ ];
+ var promise = Promise.resolve();
+ for (var position of positions)
+ promise = promise.then(testAtPosition.bind(null, uiSourceCode, position));
+
+ promise.then(() => InspectorTest.completeDebuggerTest());
+ }
+
+ function Position(line, startColumn, endColumn, originText)
+ {
+ this.line = line;
+ this.startColumn = startColumn;
+ this.endColumn = endColumn;
+ this.originText = originText;
+ }
+
+ function testAtPosition(uiSourceCode, position)
+ {
+ return WebInspector.SourceMapNamesResolver.resolveExpression(InspectorTest.debuggerModel.selectedCallFrame(), position.originText, uiSourceCode, position.line, position.startColumn, position.endColumn)
+ .then(InspectorTest.evaluateOnCurrentCallFrame)
+ .then(remoteObject => InspectorTest.addResult(remoteObject.description));
+ }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests evaluation in minified scripts.
+</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698