Commit 25d81ab3 authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

Prepare breakpoint web test for source map asyncification (1/2)

This CL removes a race in a web test where breakpoints get removed and
then the current breakpoint information is dumped. Instead of racing,
we properly wait for the debugger to confirm that the breakpoint got
removed before dumping the information.

Drive-by: Previously {removeBreakpoint} was also marked as async.
This is not needed and this CL removes async/await for
{removeBreakpoint}.

R=petermarshall@chromium.org

Bug: chromium:1032016
Change-Id: I836387085b4b3b8b85b2d035e8031efd4b54e0b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033074Reviewed-by: default avatarPeter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738102}
parent 018fddf6
......@@ -94,13 +94,15 @@
SourcesTestRunner.undoSourceEditing(javaScriptSourceFrame);
}
async function breakpointResolvedAgain() {
function breakpointResolvedAgain() {
dumpBreakpointStorageAndLocations();
TestRunner.addResult('Finally removing breakpoint:');
await SourcesTestRunner.removeBreakpoint(javaScriptSourceFrame, 2);
TestRunner.addSniffer(
Bindings.BreakpointManager.ModelBreakpoint.prototype, '_didRemoveFromDebugger', () => {
dumpBreakpointStorageAndLocations();
next();
});
SourcesTestRunner.removeBreakpoint(javaScriptSourceFrame, 2);
}
},
......@@ -147,13 +149,15 @@
SourcesTestRunner.commitSource(javaScriptSourceFrame);
}
async function breakpointResolvedAgain() {
function breakpointResolvedAgain() {
dumpBreakpointStorageAndLocations();
TestRunner.addResult('Finally removing breakpoint:');
await SourcesTestRunner.removeBreakpoint(javaScriptSourceFrame, 2);
TestRunner.addSniffer(
Bindings.BreakpointManager.ModelBreakpoint.prototype, '_didRemoveFromDebugger', () => {
dumpBreakpointStorageAndLocations();
next();
});
SourcesTestRunner.removeBreakpoint(javaScriptSourceFrame, 2);
}
},
......@@ -212,13 +216,15 @@
SourcesTestRunner.commitSource(javaScriptSourceFrame);
}
async function breakpointResolvedAgain() {
function breakpointResolvedAgain() {
dumpBreakpointStorageAndLocations();
TestRunner.addResult('Finally removing breakpoint:');
await SourcesTestRunner.removeBreakpoint(javaScriptSourceFrame, 2);
TestRunner.addSniffer(
Bindings.BreakpointManager.ModelBreakpoint.prototype, '_didRemoveFromDebugger', () => {
dumpBreakpointStorageAndLocations();
next();
});
SourcesTestRunner.removeBreakpoint(javaScriptSourceFrame, 2);
}
},
......@@ -277,13 +283,15 @@
SourcesTestRunner.commitSource(javaScriptSourceFrame);
}
async function breakpointResolvedAgain() {
function breakpointResolvedAgain() {
dumpBreakpointStorageAndLocations();
TestRunner.addResult('Finally removing breakpoint:');
await SourcesTestRunner.removeBreakpoint(javaScriptSourceFrame, 2);
TestRunner.addSniffer(
Bindings.BreakpointManager.ModelBreakpoint.prototype, '_didRemoveFromDebugger', () => {
dumpBreakpointStorageAndLocations();
next();
});
SourcesTestRunner.removeBreakpoint(javaScriptSourceFrame, 2);
}
},
]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment