Migrate all test_setBreakpoint xpcshell test to use threadClientTest helper
Categories
(DevTools :: Debugger, task, P1)
Tracking
(firefox72 fixed)
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: ochameau, Assigned: bhackett1024)
References
(Blocks 3 open bugs)
Details
(Keywords: good-first-bug, Whiteboard: dt-fission-reserve)
Attachments
(1 file)
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
Bug 1512220 refactored all the test_setBreakpoint tests, but there is many xpcshell tests which are not using the threadFrontTest
helper and are duplicating a few lines in each test.
Here is an helpful query to find them out:
https://searchfox.org/mozilla-central/search?q=symbol:%23initTestDebuggerServer&redirect=false
The helper is here:
https://searchfox.org/mozilla-central/rev/8b7aa8af652f87d39349067a5bc9c0256bf6dedc/devtools/server/tests/unit/head_dbg.js#868-944
For example this test:
https://searchfox.org/mozilla-central/rev/8b7aa8af652f87d39349067a5bc9c0256bf6dedc/devtools/server/tests/unit/test_blackboxing-01.js#14-29
function run_test() {
initTestDebuggerServer();
gDebuggee = addTestGlobal("test-black-box");
gClient = new DebuggerClient(DebuggerServer.connectPipe());
gClient.connect().then(function() {
attachTestTabAndResume(gClient, "test-black-box", function(
response,
targetFront,
threadFront
) {
gThreadFront = threadFront;
testBlackBox();
});
});
do_test_pending();
}
Could most likely be written like this one:
https://searchfox.org/mozilla-central/rev/8b7aa8af652f87d39349067a5bc9c0256bf6dedc/devtools/server/tests/unit/test_breakpoint-01.js#11-13
add_task(
threadFrontTest(async ({ threadFront, debuggee }) => {
(async () => {
await testBlockBox(threadFront);
})
));
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Comment 4•5 years ago
|
||
bugherder |
Description
•