Reduce usage of TargetFactory.forTab to interact with the toolbox
Categories
(DevTools :: General, task, P3)
Tracking
(firefox88 fixed)
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
Details
Attachments
(7 files, 1 obsolete file)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
In many devtools tests, we use TargetFactory::forTab in order to get or create a cached target for a given tab.
However as we want to move away from targets and go to descriptors, relying on those APIs becomes a problem. Associating a tab to a target means we need to update it everytime the top level target changes, which is unnecessarily complex.
Most call sites for forTab in tests use it only to pass it to gDevTools.showToolbox/getToolbox/closeToolbox. Instead we can reuse gDevTools.showToolboxForTab (being introduced in Bug 1688688) and add variants for get
& close
.
This should make refactoring the TargetFactory easier.
Assignee | ||
Comment 1•3 years ago
|
||
Depends on D105743
Assignee | ||
Comment 2•3 years ago
|
||
Depends on D105743
Assignee | ||
Comment 3•3 years ago
|
||
Depends on D105998
Assignee | ||
Comment 4•3 years ago
|
||
Depends on D105999
Assignee | ||
Comment 5•3 years ago
|
||
Depends on D106000
Assignee | ||
Comment 6•3 years ago
|
||
Depends on D106001
Updated•3 years ago
|
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D106002
Assignee | ||
Comment 8•3 years ago
|
||
Depends on D106032
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5f6688e8fe4c [devtools] Add getToolboxForTab and closeToolboxForTab helpers on gDevTools r=ochameau https://hg.mozilla.org/integration/autoland/rev/6beb9dd48ef3 [devtools] Stop using TargetFactory.forTab in devtools code r=perftest-reviewers,ochameau https://hg.mozilla.org/integration/autoland/rev/299f17e9cb6f [devtools] Stop using TargetFactory forTab in devtools browser mochitests r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/45a8dc952aba [devtools] Stop using TargetFactory.forTab outside of devtools r=rpl,ochameau https://hg.mozilla.org/integration/autoland/rev/0b8f857e3f90 [devtools] Remove unused getTargetForTab helper on gDevTools r=ochameau https://hg.mozilla.org/integration/autoland/rev/74adaced5c0a [devtools] Stop using TargetFactory:forTab in netmonitor to retrieve the parent toolbox r=bomsy,ochameau https://hg.mozilla.org/integration/autoland/rev/d5a70a3143ad [devtools] Rename TargetFactory to TabTargetFactory and update filename r=ochameau
Failed to create upstream wpt PR due to merge conflicts. This requires fixup from a wpt sync admin.
Comment 11•3 years ago
|
||
Backed out 10 changesets (bug 1694140, bug 1694886, bug 1688688) for devtools failures on browser_CORS-console-warnings.js.
https://hg.mozilla.org/integration/autoland/rev/55019aa73595f6c194774b1999c440e1aef2bc9e
Push with failures:
https://treeherder.mozilla.org/jobs?repo=autoland&revision=1b7367a27d9ab527d63ef8eac7af1111ab0eb7b9&selectedTaskRun=ff1I83nYQSC8WTxh546ZAA.0
Failure log:
https://treeherder.mozilla.org/logviewer?job_id=331196400&repo=autoland&lineNumber=8892
Comment 12•3 years ago
|
||
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/84577250aaac [devtools] Add getToolboxForTab and closeToolboxForTab helpers on gDevTools r=ochameau https://hg.mozilla.org/integration/autoland/rev/d65518e8bd55 [devtools] Stop using TargetFactory.forTab in devtools code r=perftest-reviewers,ochameau https://hg.mozilla.org/integration/autoland/rev/e62d2c1bbeca [devtools] Stop using TargetFactory forTab in devtools browser mochitests r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/a0c0153d96de [devtools] Stop using TargetFactory.forTab outside of devtools r=rpl,ochameau https://hg.mozilla.org/integration/autoland/rev/413192185bce [devtools] Remove unused getTargetForTab helper on gDevTools r=ochameau https://hg.mozilla.org/integration/autoland/rev/4963e0380972 [devtools] Stop using TargetFactory:forTab in netmonitor to retrieve the parent toolbox r=bomsy,ochameau https://hg.mozilla.org/integration/autoland/rev/4694d0a659ac [devtools] Rename TargetFactory to TabTargetFactory and update filename r=ochameau
Comment 13•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/84577250aaac
https://hg.mozilla.org/mozilla-central/rev/d65518e8bd55
https://hg.mozilla.org/mozilla-central/rev/e62d2c1bbeca
https://hg.mozilla.org/mozilla-central/rev/a0c0153d96de
https://hg.mozilla.org/mozilla-central/rev/413192185bce
https://hg.mozilla.org/mozilla-central/rev/4963e0380972
https://hg.mozilla.org/mozilla-central/rev/4694d0a659ac
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/27931 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Description
•