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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackbox-ranges.html

Issue 1754483002: [DevTools] Added setBlackboxPatterns method to protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@provide-hash-for-anonymous-scripts
Patch Set: Created 4 years, 10 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-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 83%
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..8c7830f5621a9c9d90feb87e0b524a96be1063d9 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 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,8 +39,9 @@ function test()
{
var callFrames = response.params.callFrames;
printCallFrames(callFrames);
- InspectorTest.sendCommand("Debugger.setBlackboxedRanges", {
- scriptId: callFrames[1].location.scriptId,
+ var hash = scriptIdToHash.get(callFrames[1].location.scriptId);
+ InspectorTest.sendCommand("Debugger.addBlackboxRanges", {
+ hash: hash,
positions: [ { line: 0, column: 0 } ] // blackbox ranges for blackboxed.js
}, setIncorrectRanges.bind(null, callFrames[2].location.scriptId));
}
@@ -53,8 +62,8 @@ function test()
return;
}
InspectorTest.log("Try to set positions: " + JSON.stringify(positions));
- InspectorTest.sendCommand("Debugger.setBlackboxedRanges", {
- scriptId: scriptId,
+ InspectorTest.sendCommand("Debugger.addBlackboxRanges", {
+ hash: scriptIdToHash.get(scriptId),
positions: positions
}, setIncorrectRanges.bind(null, scriptId));
}
@@ -62,8 +71,8 @@ function test()
function setMixedSourceRanges(scriptId)
{
InspectorTest.eventHandler["Debugger.paused"] = runAction;
- InspectorTest.sendCommandOrDie("Debugger.setBlackboxedRanges", {
- scriptId: scriptId,
+ InspectorTest.sendCommandOrDie("Debugger.addBlackboxRanges", {
+ hash: scriptIdToHash.get(scriptId),
positions: [ { line: 8, column: 0 }, { line: 15, column: 0 } ] // blackbox ranges for mixed.js
}, runAction);
}

Powered by Google App Engine
This is Rietveld 408576698