Index: third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-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-blackboxed-ranges.html |
index e31f5967256066e6ecd2de62c035983efa50f194..5bb2eb5769f4398a90f89cc5242ed60f5d4b48d1 100644 |
--- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges.html |
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges.html |
@@ -19,9 +19,17 @@ function foo() |
<script> |
function test() |
{ |
+ var scriptIdToHash = new Map(); |
+ |
InspectorTest.eventHandler["Debugger.paused"] = setBlackboxedScriptRanges; |
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = scriptParsed; |
InspectorTest.sendCommandOrDie("Debugger.enable", {}, callTestFunction); |
+ function scriptParsed(response) |
+ { |
+ scriptIdToHash.set(response.params.scriptId, response.params.hash); |
+ } |
+ |
function callTestFunction(response) |
{ |
InspectorTest.evaluateInInspectedPage("setTimeout(testFunction, 0);"); |
@@ -31,40 +39,38 @@ 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 |
+ InspectorTest.sendCommand("Debugger.setScriptBlackboxed", { |
+ hash: scriptIdToHash.get(callFrames[1].location.scriptId), |
}, setIncorrectRanges.bind(null, callFrames[2].location.scriptId)); |
} |
- var incorrectPositions = [ |
- [ { line: 0, column: 0 }, { line: 0, column: 0 } ], |
- [ { line: 0, column: 1 }, { line: 0, column: 0 } ], |
- [ { line: 0, column: -1 } ], |
+ var incorrectRanges = [ |
+ [ { startLine: 0, startColumn: 0, endLine: 0, endColumn: 0 } ], |
+ [ { startLine: 0, startColumn: 1, endLine: 0, endColumn: 0 } ] |
]; |
function setIncorrectRanges(scriptId, response) |
{ |
if (response.error) |
InspectorTest.log(response.error.message); |
- var positions = incorrectPositions.shift(); |
- if (!positions) { |
+ var ranges = incorrectRanges.shift(); |
+ if (!ranges) { |
setMixedSourceRanges(scriptId); |
return; |
} |
- InspectorTest.log("Try to set positions: " + JSON.stringify(positions)); |
- InspectorTest.sendCommand("Debugger.setBlackboxedRanges", { |
- scriptId: scriptId, |
- positions: positions |
+ InspectorTest.log("Try to set ranges: " + JSON.stringify(ranges)); |
+ InspectorTest.sendCommand("Debugger.setScriptBlackboxed", { |
+ hash: scriptIdToHash.get(scriptId), |
+ ranges: ranges |
}, 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 |
+ InspectorTest.sendCommandOrDie("Debugger.setScriptBlackboxed", { |
+ hash: scriptIdToHash.get(scriptId), |
+ ranges: [ { startLine: 8, startColumn: 0 , endLine: 15, endColumn: 0} ] // blackbox ranges for mixed.js |
}, runAction); |
} |