Closed Bug 1512220 Opened 11 months ago Closed 10 months ago

Remove even more duplicated usages of listTabs from server thread client tests


(DevTools :: Framework, enhancement, P2)



(firefox66 fixed)

Firefox 66
Tracking Status
firefox66 --- fixed


(Reporter: ochameau, Assigned: ochameau)



(Whiteboard: dt-fission)


(4 files)

There is still many xpcshell test in the server, testing the thread client that use a big copy pasted code involving listTabs.
These tests should use existing threadClientTest helper in order to avoid this copy pasted code and focus on the actual assertions the test is doing.

This is going to help the refactoring of listTabs planned in bug 1508285.
Severity: normal → enhancement
Priority: -- → P2
All these tests are clearly copy pasting existing threadClientTest helper.
They might run as well against workers but today we don't run them there, so I used the doNotRunWorker flag.

MozReview-Commit-ID: 7k1lJ06WeGZ
This isn't thread client test, but here we could share some more code with the memory tests
and use Target objects to retrieve the fronts.

MozReview-Commit-ID: C9S1VjTLrSF

Depends on D13899
This isn't removing listTabs calls as these tests were using attachTestTab,
but all these tests are using testGlobal helper whereas they don't have to if they were using threadClientTest helper.

MozReview-Commit-ID: FPtYlDvYUeD

Depends on D13900
This cleanup will help next refactorings.
Note that attachTestThread and attachTestTabAndResume are still using the callback style
as it is still being used by tests that aren't using threadClientTest helper.

MozReview-Commit-ID: 6FvoDtzEBmL

Depends on D13901
Pushed by
Switch devtools/server/tests/unit/test_setBreakpoint* tests to threadClientTest. r=yulia
Refactor promises tests to use the same test helper than memory actor's tests. r=yulia
Refactor debugger test using testGlobal to threadClientTest helper. r=yulia
Convert debugger server test helper to async functions. r=yulia
You need to log in before you can comment on or make changes to this bug.