Commit 21db8599 authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

Revert "Prepare breakpoint web tests for source map asyncification (4/5)"

This reverts commit 459e299a.

Reason for revert: Still causes test to become flaky on debug builds:
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webkit_layout_tests&tests=http%2Ftests%2Fdevtools%2Fsources%2Fdebugger%2Fsource-frame-breakpoint-decorations.js

Original change's description:
> Prepare breakpoint web tests for source map asyncification (4/5)
> 
> This CL re-writes a breakpoint web test using a new SourcesTestRunner
> helper introduced in https://crrev.com/c/2027427.
> 
> This should not only prepare the test for the upcoming source map
> asyncification but also reduce the overall flakiness of breakpoint
> web tests.
> 
> This CL superseeds the current in-flight CL https://crrev.com/c/2022642
> which will be abandoned.
> 
> R=​sigurds@chromium.org
> 
> Bug: chromium:1032016
> Change-Id: Id5bcd9d3913a2f83c029f52da33e484c61f0c9db
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2030464
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#737714}

TBR=sigurds@chromium.org,szuend@chromium.org

Change-Id: I771b2c18d94c6c3b7d124a206531806157404cac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1032016
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2030917Reviewed-by: default avatarPeter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737748}
parent 85a9094f
......@@ -25,13 +25,11 @@ breakpoint at 2
inline breakpoint at (2, 4)
inline breakpoint at (2, 13) disabled
Adding conditional enabled breakpoint
breakpoint at 2 conditional
breakpoint at 2
inline breakpoint at (2, 4)
inline breakpoint at (2, 13) disabled
Disable breakpoints
breakpoint at 2 disabled conditional
inline breakpoint at (2, 4) disabled
inline breakpoint at (2, 13) disabled
breakpoint at 2 disabled
Enable breakpoints
breakpoint at 2 conditional
inline breakpoint at (2, 4)
......
......@@ -8,6 +8,11 @@
await TestRunner.showPanel('sources');
await TestRunner.addScriptTag('resources/edit-me-breakpoints.js');
function waitAndDumpDecorations(sourceFrame) {
return SourcesTestRunner.waitDebuggerPluginBreakpoints(sourceFrame).then(
() => SourcesTestRunner.dumpDebuggerPluginBreakpoints(sourceFrame));
}
Bindings.breakpointManager._storage._breakpoints = new Map();
SourcesTestRunner.runDebuggerTestSuite([
function testAddRemoveBreakpoint(next) {
......@@ -17,18 +22,15 @@
function addBreakpoint(sourceFrame) {
javaScriptSourceFrame = sourceFrame;
TestRunner.addResult('Setting breakpoint');
// Breakpoint decoration expectations are pairs of line number plus breakpoint decoration counts.
// We expect line 2 to have 2 decorations.
SourcesTestRunner.runActionAndWaitForExactBreakpointDecorations(javaScriptSourceFrame, [[2, 2]], () =>
SourcesTestRunner.createNewBreakpoint(javaScriptSourceFrame, 2, '', true)
).then(removeBreakpoint);
SourcesTestRunner.createNewBreakpoint(javaScriptSourceFrame, 2, '', true)
.then(() => waitAndDumpDecorations(javaScriptSourceFrame))
.then(removeBreakpoint);
}
function removeBreakpoint() {
TestRunner.addResult('Toggle breakpoint');
SourcesTestRunner.runActionAndWaitForExactBreakpointDecorations(javaScriptSourceFrame, [], () =>
SourcesTestRunner.toggleBreakpoint(javaScriptSourceFrame, 2)
).then(next);
SourcesTestRunner.toggleBreakpoint(javaScriptSourceFrame, 2);
waitAndDumpDecorations(javaScriptSourceFrame).then(() => next());
}
},
......@@ -41,18 +43,15 @@
TestRunner.addResult('Setting breakpoint');
SourcesTestRunner.createNewBreakpoint(javaScriptSourceFrame, 2, '', true)
.then(() => SourcesTestRunner.waitBreakpointSidebarPane(true))
.then(() => SourcesTestRunner.runActionAndWaitForExactBreakpointDecorations(
javaScriptSourceFrame, [[2, 2]], () =>
SourcesTestRunner.createNewBreakpoint(javaScriptSourceFrame, 2, 'true', true)
))
.then(() => SourcesTestRunner.createNewBreakpoint(javaScriptSourceFrame, 2, 'true', true))
.then(() => waitAndDumpDecorations(javaScriptSourceFrame))
.then(removeBreakpoint);
}
function removeBreakpoint() {
TestRunner.addResult('Toggle breakpoint');
SourcesTestRunner.runActionAndWaitForExactBreakpointDecorations(javaScriptSourceFrame, [], () =>
SourcesTestRunner.toggleBreakpoint(javaScriptSourceFrame, 2)
).then(next);
SourcesTestRunner.toggleBreakpoint(javaScriptSourceFrame, 2);
waitAndDumpDecorations(javaScriptSourceFrame).then(() => next());
}
},
......@@ -63,51 +62,44 @@
function addRegularDisabled(sourceFrame) {
javaScriptSourceFrame = sourceFrame;
TestRunner.addResult('Adding regular disabled breakpoint');
SourcesTestRunner.runActionAndWaitForExactBreakpointDecorations(javaScriptSourceFrame, [[2, 1]], () =>
SourcesTestRunner.createNewBreakpoint(javaScriptSourceFrame, 2, '', false)
).then(addConditionalDisabled);
waitAndDumpDecorations(javaScriptSourceFrame).then(addConditionalDisabled);
SourcesTestRunner.createNewBreakpoint(javaScriptSourceFrame, 2, '', false);
}
function addConditionalDisabled() {
TestRunner.addResult('Adding conditional disabled breakpoint');
SourcesTestRunner.runActionAndWaitForExactBreakpointDecorations(javaScriptSourceFrame, [[2, 1]], () =>
SourcesTestRunner.createNewBreakpoint(javaScriptSourceFrame, 2, 'true', false)
).then(addRegularEnabled);
waitAndDumpDecorations(javaScriptSourceFrame).then(addRegularEnabled);
SourcesTestRunner.createNewBreakpoint(javaScriptSourceFrame, 2, 'true', false);
}
function addRegularEnabled() {
TestRunner.addResult('Adding regular enabled breakpoint');
SourcesTestRunner.runActionAndWaitForExactBreakpointDecorations(javaScriptSourceFrame, [[2, 2]], () =>
SourcesTestRunner.createNewBreakpoint(javaScriptSourceFrame, 2, '', true)
).then(addConditionalEnabled);
waitAndDumpDecorations(javaScriptSourceFrame).then(addConditionalEnabled);
SourcesTestRunner.createNewBreakpoint(javaScriptSourceFrame, 2, '', true);
}
function addConditionalEnabled() {
TestRunner.addResult('Adding conditional enabled breakpoint');
SourcesTestRunner.runActionAndWaitForExactBreakpointDecorations(javaScriptSourceFrame, [[2, 2]], () =>
SourcesTestRunner.createNewBreakpoint(javaScriptSourceFrame, 2, 'true', true)
).then(disableAll);
waitAndDumpDecorations(javaScriptSourceFrame).then(disableAll);
SourcesTestRunner.createNewBreakpoint(javaScriptSourceFrame, 2, 'true', true);
}
function disableAll() {
TestRunner.addResult('Disable breakpoints');
SourcesTestRunner.runActionAndWaitForExactBreakpointDecorations(javaScriptSourceFrame, [[2, 2]], () =>
SourcesTestRunner.toggleBreakpoint(javaScriptSourceFrame, 2, true)
).then(enabledAll);
waitAndDumpDecorations(javaScriptSourceFrame).then(enabledAll);
SourcesTestRunner.toggleBreakpoint(javaScriptSourceFrame, 2, true);
}
function enabledAll() {
TestRunner.addResult('Enable breakpoints');
SourcesTestRunner.runActionAndWaitForExactBreakpointDecorations(javaScriptSourceFrame, [[2, 2]], () =>
SourcesTestRunner.toggleBreakpoint(javaScriptSourceFrame, 2, true)
).then(removeAll);
waitAndDumpDecorations(javaScriptSourceFrame).then(removeAll);
SourcesTestRunner.toggleBreakpoint(javaScriptSourceFrame, 2, true);
}
function removeAll() {
TestRunner.addResult('Remove breakpoints');
SourcesTestRunner.runActionAndWaitForExactBreakpointDecorations(javaScriptSourceFrame, [], () =>
SourcesTestRunner.toggleBreakpoint(javaScriptSourceFrame, 2, false)
).then(next);
waitAndDumpDecorations(javaScriptSourceFrame).then(next);
SourcesTestRunner.toggleBreakpoint(javaScriptSourceFrame, 2, false);
}
}
]);
......
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