Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/click-gutter-breakpoint.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/click-gutter-breakpoint.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/click-gutter-breakpoint.html |
| index 9f77daa5819dfcd52fe82365c0e8a13a33d21cf1..57281a298d95ca4c07a8bd520e0cbebaa88abcdd 100644 |
| --- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/click-gutter-breakpoint.html |
| +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/click-gutter-breakpoint.html |
| @@ -6,19 +6,21 @@ |
| <script> |
| function test() |
| { |
| - function clickCodeMirrorLineNumber(lineNumber) |
| + function clickCodeMirrorLineNumber(lineNumber, isRemove, sourceFrame) |
| { |
| var element = Array.from(document.getElementsByClassName("CodeMirror-linenumber")).filter(x => x.textContent === (lineNumber + 1).toString())[0]; |
| if (!element) { |
| InspectorTest.addResult("CodeMirror Gutter Not Found:" + lineNumber); |
| InspectorTest.completeDebuggerTest(); |
| - return false; |
| + return Promise.resolve(); |
| } |
| var rect = element.getBoundingClientRect(); |
| eventSender.mouseMoveTo(rect.left + rect.width / 2, rect.top + rect.height / 2); |
| eventSender.mouseDown(); |
| eventSender.mouseUp(); |
| - return true; |
| + if (!isRemove) |
| + return new Promise(resolve => InspectorTest.addSniffer(sourceFrame.__proto__, "_setBreakpoint", resolve, false)); |
|
dgozman
2016/11/09 20:44:03
Introduce a special method |_breakpointWasSetForTe
kozy
2016/11/10 03:17:36
Done.
|
| + return Promise.resolve(); |
| } |
| WebInspector.breakpointManager._storage._breakpoints = {}; |
| @@ -29,11 +31,16 @@ function test() |
| InspectorTest.startDebuggerTest(() => InspectorTest.showScriptSource("click-breakpoints.js", didShowScriptSource)); |
| - function didShowScriptSource() |
| + function didShowScriptSource(sourceFrame) |
| + { |
| + clickCodeMirrorLineNumber(2, false, sourceFrame) |
| + .then(() => clickCodeMirrorLineNumber(2, true, sourceFrame)) |
| + .then(() => clickCodeMirrorLineNumber(3, false, sourceFrame)) |
| + .then(runScript); |
| + } |
| + |
| + function runScript() |
| { |
| - clickCodeMirrorLineNumber(2); |
| - clickCodeMirrorLineNumber(2); |
| - clickCodeMirrorLineNumber(3); |
| InspectorTest.waitUntilPaused(pausedInF2); |
| InspectorTest.evaluateInPageWithTimeout("f2()"); |
| } |