| 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..9453fcdc56fe7d6e60176b408f3f0beff6435d39
|
| --- /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__, "_breakpointWasSetForTest", 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>Checks that locations are correctly resolved for gutter click.</p>
|
| +</body>
|
| +</html>
|
|
|