Closed Bug 1512220 Opened 11 months ago Closed 10 months ago

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

Categories

(DevTools :: Framework, enhancement, P2)

enhancement

Tracking

(firefox66 fixed)

RESOLVED FIXED
Firefox 66
Tracking Status
firefox66 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

(Whiteboard: dt-fission)

Attachments

(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 apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/434525362f73
Switch devtools/server/tests/unit/test_setBreakpoint* tests to threadClientTest. r=yulia
https://hg.mozilla.org/integration/autoland/rev/67fb7c7594fc
Refactor promises tests to use the same test helper than memory actor's tests. r=yulia
https://hg.mozilla.org/integration/autoland/rev/9367d35f4dab
Refactor debugger test using testGlobal to threadClientTest helper. r=yulia
https://hg.mozilla.org/integration/autoland/rev/943836f5e528
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.