Closed
Bug 1497917
Opened 6 years ago
Closed 6 years ago
Add tests for USB runtime components
Categories
(DevTools :: about:debugging, enhancement, P1)
DevTools
about:debugging
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ladybenko, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
Attachments
(6 files, 2 obsolete files)
46 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
We have to add mochitests for USB runtimes.
We would need some solution to provide fake USB runtimes (mocks / fake adb server https://searchfox.org/mozilla-central/source/devtools/shared/adb/test/adb.py / other).
Updated•6 years ago
|
Priority: -- → P2
Assignee | ||
Comment 1•6 years ago
|
||
As discussed on slack, this bug will be about selecting the technical solution for USB runtimes tests as well as adding at least one test as a proof of concept.
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Priority: P2 → P1
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
Updated•6 years ago
|
Attachment #9020043 -
Attachment is obsolete: true
Updated•6 years ago
|
Attachment #9019825 -
Attachment is obsolete: true
Assignee | ||
Comment 4•6 years ago
|
||
I want to go through a first round of review before moving forward. If we agree
on the basic approach in this patch two things:
- I want to complexify things by adding a test that connects to a runtime and shows
the runtime page (to exercise more than this very simple use case)
- I will probably separate the loader modification in a separate bug, will open a RFC to
discuss it and will use a workaround for now in our code so that we are not blocked
Overall I don't want to start adding too many features to this mocking solution, I would
rather wait until the tests help us understand what fits best our needs.
Assignee | ||
Comment 5•6 years ago
|
||
Depends on D9801
This a preparatory work that ensures that all the calls to DevTools client are made
through a wrapper called ClientWrapper. I initially tried having a static "client" helper
but the test code was really hard to follow. Keeping a "client-like" object makes this
easier.
Assignee | ||
Comment 6•6 years ago
|
||
Depends on D10095
The initial intent was to extract the logic to create the USB clients
so that it could be mocked in our tests. However since USB clients
share most of their logic with network clients, it did not make sense
to extract USB without network. And once you have USB and network, there
is no good reason to keep local client out.
I don't think "runtime-helper.js" is a good module name here. The role
of this module is to build clients for runtimes, but at the same time
it is just a static helper. Could not find a good name, and we already
have inconsistent module names in our modules/ folder so I did not want
to introduce something like RuntimeClientBuilder of RuntimeClientProvider
etc...
One of the consequences is that once we start mocking this helper (in the
next patch) we will also have to mock the this-firefox runtime. It has
advantages and disadvantages but I think we can live with this for now.
Assignee | ||
Comment 7•6 years ago
|
||
Depends on D10096
Adds a first test that simply connects to a USB runtime (but also has to
mock this-firefox runtime).
Assignee | ||
Comment 8•6 years ago
|
||
Depends on D10097
Updated•6 years ago
|
Attachment #9021857 -
Attachment description: Bug 1497917 - Wait for stores to settle instead of assuming they will have > 0 items;r=daisuke → Bug 1497917 - Wait until REQUEST_*_SUCCESS to be dispatched in about:debugging tests;r=daisuke
Assignee | ||
Updated•6 years ago
|
Keywords: leave-open
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/989163347094
Wait until REQUEST_*_SUCCESS to be dispatched in about:debugging tests;r=daisuke
Comment 10•6 years ago
|
||
bugherder |
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Comment 12•6 years ago
|
||
Rebased and updated all patches. Try ongoing at https://treeherder.mozilla.org/#/jobs?repo=try&revision=9ed0f7c4d66ee212444b5edb28fddd791e76f58d
Comment 13•6 years ago
|
||
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d67038338e2f
Add test helper to new aboutdebugging to mock require calls;r=ladybenko,daisuke
https://hg.mozilla.org/integration/autoland/rev/88ef91cd3bd6
Add USB runtime mock and sidebar test for USB runtimes;r=ladybenko,daisuke
https://hg.mozilla.org/integration/autoland/rev/0620a6320abf
Add ClientWrapper to interact with DevTools client in aboutdebugging;r=ladybenko,daisuke
https://hg.mozilla.org/integration/autoland/rev/dfd527956c4b
Extract client creation to RuntimeHelper module;r=ladybenko,daisuke
https://hg.mozilla.org/integration/autoland/rev/1543fc07760a
Mock runtimes and client for USB tests;r=ladybenko,daisuke
Comment 14•6 years ago
|
||
bugherder |
Assignee | ||
Updated•6 years ago
|
Keywords: leave-open
Assignee | ||
Updated•6 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•