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> |