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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/use-possible-breakpoints-to-resolve-breakpoint.html

Issue 2484283004: [DevTools] added BreakpointManager.possibleBreakpoints method (Closed)
Patch Set: rebased tests Created 4 years, 1 month 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/sources/debugger-breakpoints/use-possible-breakpoints-to-resolve-breakpoint.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/use-possible-breakpoints-to-resolve-breakpoint.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/use-possible-breakpoints-to-resolve-breakpoint.html
new file mode 100644
index 0000000000000000000000000000000000000000..98dc0ea13516baa7890db7af67d01bfb0fbab9f9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/use-possible-breakpoints-to-resolve-breakpoint.html
@@ -0,0 +1,66 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script>
+function foo() {
+ var p = Promise.resolve()
+ .then(() => 239);
+ console.log(42);
+ // comments 1
+ // comments 2
+ // comments 3
+ // comments 4
+ // comments 5
+ fetch("url").then(response => response.data()).then(data => data.json());
+ // comment 6
+ // super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment,
+ // comment 7
+ Promise.resolve();
+ return p;
+}
+//# sourceURL=foo.js
+</script>
+<script>
+
+function test()
+{
+ InspectorTest.startDebuggerTestPromise()
+ .then(() => InspectorTest.showScriptSource("foo.js", didShowScriptSource));
+
+ function didShowScriptSource(sourceFrame)
+ {
+ var uiSourceCode = sourceFrame._uiSourceCode;
+ var breakpointManager = WebInspector.breakpointManager;
+ setBreakpoint(breakpointManager, sourceFrame, 3, false)
+ .then(() => setBreakpoint(breakpointManager, sourceFrame, 4, false))
+ .then(() => setBreakpoint(breakpointManager, sourceFrame, 5, false))
+ .then(() => setBreakpoint(breakpointManager, sourceFrame, 6, false))
+ .then(() => setBreakpoint(breakpointManager, sourceFrame, 11, false))
+ .then(() => setBreakpoint(breakpointManager, sourceFrame, 12, false))
+ .then(() => setBreakpoint(breakpointManager, sourceFrame, 13, false))
+ .then(() => InspectorTest.completeDebuggerTest());
+ }
+
+ function setBreakpoint(breakpointManager, sourceFrame, lineNumberClicked, shiftKey)
+ {
+ var resolveCallback;
+ var promise = new Promise(resolve => resolveCallback = resolve);
+ InspectorTest.addSniffer(sourceFrame.__proto__, "_setBreakpoint", dumpLocation, false);
+ sourceFrame._handleGutterClick({ data: { lineNumber: lineNumberClicked, event: { button: 0, shiftKey: shiftKey, consume: () => true }}});
+ return promise;
+
+ function dumpLocation(lineNumber, columnNumber, condition, enabled)
+ {
+ InspectorTest.addResult(`${lineNumberClicked}: breakpointAdded(${lineNumber}, ${columnNumber})`);
+ resolveCallback();
+ }
+ }
+};
+
+</script>
+</head>
+<body onload="runTest()">
+<p></p>
dgozman 2016/11/09 20:44:03 Please add test description.
kozy 2016/11/10 03:17:36 Done.
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698