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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setBlackboxPatterns.html

Issue 1902993002: [DevTools] Introduce provisional blackboxing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/debugger-setBlackboxPatterns.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setBlackboxPatterns.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setBlackboxPatterns.html
new file mode 100644
index 0000000000000000000000000000000000000000..da98d6a854b44dd940383c410d3b16ca3ce27e39
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setBlackboxPatterns.html
@@ -0,0 +1,67 @@
+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+<script>
+function bar()
+{
+ return 42;
+}
+</script>
+<script>
+function foo()
+{
+ var a = bar();
+ return a + 1;
+}
+//# sourceURL=foo.js
+</script>
+<script>
+function qwe()
+{
+ var a = foo();
+ return a + 1;
+}
+//# sourceURL=qwe.js
+</script>
+<script>
+function baz()
+{
+ var a = qwe();
+ return a + 1;
+}
+//# sourceURL=baz.js
+</script>
+<script>
+function test()
+{
+ InspectorTest.sendCommand("Debugger.enable", {});
+ InspectorTest.sendCommand("Debugger.setBlackboxPatterns", { patterns: [ "foo([" ] }, dumpError);
dgozman 2016/04/20 02:06:39 Let's add inspector test which: - sets the blackbo
+
+ function dumpError(message)
+ {
+ InspectorTest.log(message.error.message);
+ InspectorTest.eventHandler["Debugger.paused"] = dumpStackAndRunNextCommand;
+ InspectorTest.sendCommandOrDie("Debugger.setBlackboxPatterns", { patterns: [ "baz\.js", "foo\.js" ] });
+ InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "debugger;baz()" });
+ }
+
+ var commands = [ "stepInto", "stepInto", "stepInto", "stepOut", "stepOut" ];
dgozman 2016/04/20 02:06:39 Let's change last stepOut to stepIn.
+ function dumpStackAndRunNextCommand(message)
+ {
+ InspectorTest.log("Paused in");
+ var callFrames = message.params.callFrames;
+ for (var callFrame of callFrames)
+ InspectorTest.log((callFrame.functionName || "(...)") + ":" + (callFrame.location.lineNumber + 1));
+ var command = commands.shift();
+ if (!command) {
+ InspectorTest.completeTest();
+ return;
+ }
+ InspectorTest.sendCommandOrDie("Debugger." + command, {});
+ }
+
+}
+</script>
+</head>
+<body onLoad="runTest();"></body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698