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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/click-gutter-breakpoint.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
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..63f796838c18db9143a7b5a19043123566232832 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__, "_breakpointWasSetForTest", resolve, false));
+ 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()");
}

Powered by Google App Engine
This is Rietveld 408576698