| Index: third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-source-map-and-blackboxing.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-inline-source-map-and-blackboxing.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-source-map-and-blackboxing.html
|
| similarity index 52%
|
| copy from third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-inline-source-map-and-blackboxing.html
|
| copy to third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-source-map-and-blackboxing.html
|
| index 6193b69d50c7c236c7fcbbab14197b5fc4e1f7d8..4c7d2ae9f4c1cf1c29cfc817d0a66f31db7abb4f 100644
|
| --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-inline-source-map-and-blackboxing.html
|
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-source-map-and-blackboxing.html
|
| @@ -1,25 +1,51 @@
|
| <html>
|
| <head>
|
| <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
|
| -<script type="text/javascript" src="resources/framework-with-inline-sourcemap.js"></script>
|
| +<script type="text/javascript" src="resources/framework-with-sourcemap.js"></script>
|
| <script>
|
| -function boo()
|
| +function boo(m)
|
| {
|
| - return 239;
|
| + var i = 42 * m;
|
| + return i + 239;
|
| }
|
|
|
| function testFunction()
|
| {
|
| debugger;
|
| - foo(boo);
|
| + foo(boo.bind(null, 2));
|
| }
|
|
|
| function test()
|
| {
|
| var actions = [ "stepInto", "stepInto", "stepOut" ];
|
|
|
| + var sourceMap = {
|
| + version: 3,
|
| + sources: [ "foo.js" ],
|
| + names: [],
|
| + mappings: ";;AAAA,SAAS,GAAG,CAAC,GAAG,EAChB;AACI,QAAI,CAAC,GAAG,EAAE,CAAC;AACX,QAAI,GAAG,GAAG,GAAG,EAAE,CAAC;AAChB,WAAO,CAAE,GAAG,CAAC;CAChB"
|
| + };
|
| +
|
| InspectorTest.eventHandler["Debugger.paused"] = printStackTraceAndMakeNextStep;
|
| - InspectorTest.sendCommand("Debugger.enable", {}, setSkipStackFrames);
|
| + InspectorTest.eventHandler["Debugger.scriptParsed"] = scriptParsed;
|
| + InspectorTest.sendCommand("Debugger.enable");
|
| +
|
| + function scriptParsed(response)
|
| + {
|
| + failIfError(response);
|
| +
|
| + if (response.params.url.endsWith("/framework-with-sourcemap.js"))
|
| + setSourceMapContent(response.params.scriptId);
|
| + }
|
| +
|
| + function setSourceMapContent(scriptId)
|
| + {
|
| + InspectorTest.sendCommand("Debugger.setSourceMapContent", {
|
| + scriptId: scriptId,
|
| + sourceMapURL: "source.map",
|
| + content: JSON.stringify(sourceMap)
|
| + }, setSkipStackFrames);
|
| + }
|
|
|
| function setSkipStackFrames(response)
|
| {
|
| @@ -38,10 +64,8 @@ function test()
|
| failIfError(response);
|
| var callFrames = response.params.callFrames;
|
| InspectorTest.log("Stack trace:")
|
| - for (var callFrame of callFrames) {
|
| - var location = callFrame.functionLocation.lineNumber + ":" + callFrame.functionLocation.columnNumber;
|
| - InspectorTest.log(callFrame.functionName + ":" + location);
|
| - }
|
| + for (var callFrame of callFrames)
|
| + InspectorTest.log(callFrame.functionName + ":" + callFrame.functionLocation.lineNumber + ":" + callFrame.functionLocation.columnNumber);
|
|
|
| var action = actions.shift();
|
| if (!action)
|
|
|