Commit 93b15ab5 authored by Eric Leese's avatar Eric Leese Committed by Commit Bot

Remove broken Breakpoints in multiple workers test

This test verifies broken behavior, specifically ensuring disabled
breakpoints are lost when in a script in multiple workers. This
test has been replaced by a devtools end-to-end test.

Bug: chromium:670180
Change-Id: I82e73eca50eaa7bddecb01ca7e7bf120bb354791
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2116214Reviewed-by: default avatarTim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753177}
parent b20c6e18
......@@ -185,7 +185,6 @@ crbug.com/874695 http/tests/devtools/persistence/persistence-mimetype-on-rename.
crbug.com/450493 crbug.com/971262 http/tests/devtools/profiler/live-line-level-heap-profile.js [ Crash Pass Timeout ]
crbug.com/831673 http/tests/devtools/reveal-objects.js [ Pass Timeout ]
crbug.com/849670 http/tests/devtools/service-workers/service-worker-v8-cache.js [ Timeout ]
crbug.com/874695 crbug.com/954319 http/tests/devtools/sources/debugger-breakpoints/breakpoints-ui-in-multiple-workers.js [ Crash Pass Timeout ]
crbug.com/874695 http/tests/devtools/sources/debugger-breakpoints/breakpoints-ui-shifted-breakpoint.js [ Timeout ]
crbug.com/874695 http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints.js [ Crash Pass ]
crbug.com/450493 crbug.com/912793 http/tests/devtools/sources/debugger-breakpoints/restore-locations-for-breakpoint-with-broken-source-map.js [ Crash Failure Pass Timeout ]
......
......@@ -398,7 +398,6 @@ crbug.com/874695 http/tests/devtools/inspect-iframe-from-different-domain.js [ S
crbug.com/874695 http/tests/devtools/oopif/oopif-cookies-refresh.js [ Slow ]
crbug.com/874695 http/tests/devtools/persistence/persistence-mimetype-on-rename.js [ Slow ]
crbug.com/874695 http/tests/devtools/service-workers/user-agent-override.js [ Slow ]
crbug.com/874695 http/tests/devtools/sources/debugger-breakpoints/breakpoints-ui-in-multiple-workers.js [ Slow ]
crbug.com/874695 http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints.js [ Slow ]
crbug.com/874695 http/tests/devtools/sources/debugger/debugger-proto-property.js [ Slow ]
crbug.com/874695 http/tests/devtools/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints.js [ Slow ]
......
......@@ -5707,7 +5707,6 @@ crbug.com/954297 [ Linux ] http/tests/devtools/oopif/oopif-presentation-console-
crbug.com/954297 [ Win ] http/tests/devtools/oopif/oopif-presentation-console-messages.js [ Pass Crash Timeout ]
# Sheriff 2019-04-22
crbug.com/954319 [ Linux ] http/tests/devtools/sources/debugger-breakpoints/breakpoints-ui-in-multiple-workers.js [ Pass Timeout ]
crbug.com/954998 [ Mac ] http/tests/devtools/tracing/timeline-js/timeline-js-line-level-profile-end-to-end.js [ Pass Timeout ]
# Sheriff 2019-04-25
......
Tests breakpoint works in multiple workers.
Set different breakpoints and dump them
breakpoint at 1
breakpoint at 2 conditional
breakpoint at 3 disabled
Reload page and add script again and dump breakpoints
Page reloaded.
breakpoint at 1
breakpoint at 2 conditional
breakpoint at 3 disabled
Added two more workers
Show uiSourceCode and dump breakpoints
breakpoint at 1
breakpoint at 2 conditional
Show uiSourceCode and dump breakpoints
breakpoint at 1
breakpoint at 2 conditional
Show uiSourceCode and dump breakpoints
breakpoint at 1
breakpoint at 2 conditional
breakpoint at 3 disabled
Test breakpoint in each worker
Script execution paused.
Call stack:
0) onmessage (worker.js:2)
Script execution resumed.
Script execution paused.
Call stack:
0) onmessage (worker.js:2)
Script execution resumed.
Script execution paused.
Call stack:
0) onmessage (worker.js:2)
Script execution resumed.
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult('Tests breakpoint works in multiple workers.');
await TestRunner.loadModule('sources_test_runner');
await TestRunner.showPanel('sources');
// Pairs of line number plus breakpoint decoration counts.
// We expected line 1-3 to have one decoration each.
const expectedDecorations = [[1, 1], [2, 1], [3, 1]];
await addWorker('resources/worker.js');
let workerSourceFrame = await SourcesTestRunner.showScriptSourcePromise('worker.js');
TestRunner.addResult('Set different breakpoints and dump them');
await SourcesTestRunner.runActionAndWaitForExactBreakpointDecorations(
workerSourceFrame, expectedDecorations, async () => {
await SourcesTestRunner.toggleBreakpoint(workerSourceFrame, 1, false);
await SourcesTestRunner.createNewBreakpoint(workerSourceFrame, 2, 'a === 3', true);
await SourcesTestRunner.createNewBreakpoint(workerSourceFrame, 3, '', false);
});
TestRunner.addResult('Reload page and add script again and dump breakpoints');
await TestRunner.reloadPagePromise();
await addWorker(TestRunner.url('resources/worker.js'));
let sourceFrameAfterReload = await SourcesTestRunner.showScriptSourcePromise('worker.js');
await SourcesTestRunner.waitForExactBreakpointDecorations(
sourceFrameAfterReload, expectedDecorations, true);
SourcesTestRunner.dumpDebuggerPluginBreakpoints(sourceFrameAfterReload);
TestRunner.addResult('Added two more workers');
await addWorker(TestRunner.url('resources/worker.js'));
await addWorker(TestRunner.url('resources/worker.js'));
const uiSourceCodes = await waitForNScriptSources('worker.js', 3);
// The disabled breakpoint on line 3 is not included in the newly added workers.
const expectedDecorationsArray = [
[[1, 1], [2, 1]],
[[1, 1], [2, 1]],
expectedDecorations
];
let index = 0;
for (const uiSourceCode of uiSourceCodes) {
TestRunner.addResult('Show uiSourceCode and dump breakpoints');
const sourceFrame = await SourcesTestRunner.showUISourceCodePromise(uiSourceCode);
await SourcesTestRunner.waitForExactBreakpointDecorations(
sourceFrame, expectedDecorationsArray[index++], true);
SourcesTestRunner.dumpDebuggerPluginBreakpoints(sourceFrame);
}
TestRunner.addResult('Test breakpoint in each worker');
await SourcesTestRunner.startDebuggerTestPromise();
for (var i = 0; i < 3; ++i) {
const pausedPromise = SourcesTestRunner.waitUntilPausedPromise();
await TestRunner.evaluateInPageAsync(`window.workers[${i}].postMessage('')`);
const callFrames = await pausedPromise;
await SourcesTestRunner.captureStackTrace(callFrames);
await new Promise(resolve => SourcesTestRunner.resumeExecution(resolve));
}
SourcesTestRunner.completeDebuggerTest();
async function waitForNScriptSources(scriptName, N) {
while (true) {
let uiSourceCodes = UI.panels.sources._workspace.uiSourceCodes();
uiSourceCodes = uiSourceCodes.filter(uiSourceCode => uiSourceCode.project().type() !== Workspace.projectTypes.Service && uiSourceCode.name() === scriptName);
if (uiSourceCodes.length === N)
return uiSourceCodes;
await TestRunner.addSnifferPromise(Sources.SourcesView.prototype, '_addUISourceCode');
}
}
function addWorker(url) {
return TestRunner.evaluateInPageAsync(`
(function(){
window.workers = window.workers || [];
window.workers.push(new Worker('${url}'));
})();
`);
}
})();
\ No newline at end of file
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