| Index: third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackbox-ranges.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackbox-ranges.html
|
| similarity index 73%
|
| rename from third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges.html
|
| rename to third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackbox-ranges.html
|
| index e31f5967256066e6ecd2de62c035983efa50f194..4a9ad498583b287ea4393938752ad9ba2c502456 100644
|
| --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges.html
|
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackbox-ranges.html
|
| @@ -19,9 +19,17 @@ function foo()
|
| <script>
|
| function test()
|
| {
|
| + var scriptIdToPattern = new Map();
|
| +
|
| InspectorTest.eventHandler["Debugger.paused"] = setBlackboxedScriptRanges;
|
| + InspectorTest.eventHandler["Debugger.scriptParsed"] = scriptParsed;
|
| InspectorTest.sendCommandOrDie("Debugger.enable", {}, callTestFunction);
|
|
|
| + function scriptParsed(response)
|
| + {
|
| + scriptIdToPattern.set(response.params.scriptId, response.params.hasSourceURL ? { url: response.params.url } : { hash: response.params.hash });
|
| + }
|
| +
|
| function callTestFunction(response)
|
| {
|
| InspectorTest.evaluateInInspectedPage("setTimeout(testFunction, 0);");
|
| @@ -31,9 +39,10 @@ function test()
|
| {
|
| var callFrames = response.params.callFrames;
|
| printCallFrames(callFrames);
|
| - InspectorTest.sendCommand("Debugger.setBlackboxedRanges", {
|
| - scriptId: callFrames[1].location.scriptId,
|
| - positions: [ { line: 0, column: 0 } ] // blackbox ranges for blackboxed.js
|
| + var pattern = scriptIdToPattern.get(callFrames[1].location.scriptId);
|
| + pattern.positions = [ { line: 0, column: 0 } ]; // blackbox ranges for blackboxed.js
|
| + InspectorTest.sendCommand("Debugger.addBlackboxPatterns", {
|
| + patterns: [ pattern ]
|
| }, setIncorrectRanges.bind(null, callFrames[2].location.scriptId));
|
| }
|
|
|
| @@ -53,18 +62,20 @@ function test()
|
| return;
|
| }
|
| InspectorTest.log("Try to set positions: " + JSON.stringify(positions));
|
| - InspectorTest.sendCommand("Debugger.setBlackboxedRanges", {
|
| - scriptId: scriptId,
|
| - positions: positions
|
| + var pattern = scriptIdToPattern.get(scriptId);
|
| + pattern.positions = positions;
|
| + InspectorTest.sendCommand("Debugger.addBlackboxPatterns", {
|
| + patterns: [ pattern ]
|
| }, setIncorrectRanges.bind(null, scriptId));
|
| }
|
|
|
| function setMixedSourceRanges(scriptId)
|
| {
|
| InspectorTest.eventHandler["Debugger.paused"] = runAction;
|
| - InspectorTest.sendCommandOrDie("Debugger.setBlackboxedRanges", {
|
| - scriptId: scriptId,
|
| - positions: [ { line: 8, column: 0 }, { line: 15, column: 0 } ] // blackbox ranges for mixed.js
|
| + var pattern = scriptIdToPattern.get(scriptId);
|
| + pattern.positions = [ { line: 8, column: 0 }, { line: 15, column: 0 } ]; // blackbox ranges for mixed.js
|
| + InspectorTest.sendCommandOrDie("Debugger.addBlackboxPatterns", {
|
| + patterns: [ pattern ]
|
| }, runAction);
|
| }
|
|
|
|
|