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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/possible-breakpoints.html

Issue 2484283004: [DevTools] added BreakpointManager.possibleBreakpoints method (Closed)
Patch Set: addressed comments 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/possible-breakpoints-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/possible-breakpoints.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/possible-breakpoints.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/possible-breakpoints.html
new file mode 100644
index 0000000000000000000000000000000000000000..62d425b3bc880c4db2b809207982e04d15a169ca
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/possible-breakpoints.html
@@ -0,0 +1,52 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script>
+function foo() {
+ Promise.resolve().then(() => 239).then(() => 42);
+ Promise.resolve();
+ return;
+}
+//# 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;
+
+ InspectorTest.addResult("Locations for first line");
+ breakpointManager.possibleBreakpoints(uiSourceCode, new WebInspector.TextRange(0, 0, 1, 0))
+ .then(dumpLocations)
+ .then(() => InspectorTest.addResult("All locations"))
+ .then(() => breakpointManager.possibleBreakpoints(uiSourceCode, new WebInspector.TextRange(0, 0, 6, 0)))
+ .then(dumpLocations)
+ .then(() => InspectorTest.addResult("Existing location by position"))
+ .then(() => breakpointManager.possibleBreakpoints(uiSourceCode, new WebInspector.TextRange(2, 31, 2, 32)))
+ .then(dumpLocations)
+ .then(() => InspectorTest.addResult("Not existing location by position"))
+ .then(() => breakpointManager.possibleBreakpoints(uiSourceCode, new WebInspector.TextRange(2, 32, 2, 33)))
+ .then(dumpLocations)
+ .then(() => InspectorTest.completeDebuggerTest());
+ }
+
+ function dumpLocations(locations)
+ {
+ for (var location of locations)
+ InspectorTest.addResult(`location(${location.lineNumber}, ${location.columnNumber})`);
+ }
+};
+
+</script>
+</head>
+<body onload="runTest()">
+<p>Checks that BreakpointManager.possibleBreakpoints returns correct locations</p>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/possible-breakpoints-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698