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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script>
6 function foo() {
7 Promise.resolve().then(() => 239).then(() => 42);
8 Promise.resolve();
9 return;
10 }
11 //# sourceURL=foo.js
12 </script>
13 <script>
14
15 function test()
16 {
17 InspectorTest.startDebuggerTestPromise()
18 .then(() => InspectorTest.showScriptSource("foo.js", didShowScriptSource ));
19
20 function didShowScriptSource(sourceFrame)
21 {
22 var uiSourceCode = sourceFrame._uiSourceCode;
23 var breakpointManager = WebInspector.breakpointManager;
24
25 InspectorTest.addResult("Locations for first line");
26 breakpointManager.possibleBreakpoints(uiSourceCode, new WebInspector.Tex tRange(0, 0, 1, 0))
27 .then(dumpLocations)
28 .then(() => InspectorTest.addResult("All locations"))
29 .then(() => breakpointManager.possibleBreakpoints(uiSourceCode, new WebInspector.TextRange(0, 0, 6, 0)))
30 .then(dumpLocations)
31 .then(() => InspectorTest.addResult("Existing location by position") )
32 .then(() => breakpointManager.possibleBreakpoints(uiSourceCode, new WebInspector.TextRange(2, 31, 2, 32)))
33 .then(dumpLocations)
34 .then(() => InspectorTest.addResult("Not existing location by positi on"))
35 .then(() => breakpointManager.possibleBreakpoints(uiSourceCode, new WebInspector.TextRange(2, 32, 2, 33)))
36 .then(dumpLocations)
37 .then(() => InspectorTest.completeDebuggerTest());
38 }
39
40 function dumpLocations(locations)
41 {
42 for (var location of locations)
43 InspectorTest.addResult(`location(${location.lineNumber}, ${location .columnNumber})`);
44 }
45 };
46
47 </script>
48 </head>
49 <body onload="runTest()">
50 <p>Checks that BreakpointManager.possibleBreakpoints returns correct locations</ p>
51 </body>
52 </html>
OLDNEW
« 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