Closed
Bug 1420179
Opened 7 years ago
Closed 7 years ago
test framework: shared-head refreshTab takes an unused tab argument
Categories
(DevTools :: Framework, enhancement, P3)
Tracking
(firefox59 fixed)
RESOLVED
FIXED
Firefox 59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
Details
Attachments
(1 file)
See https://searchfox.org/mozilla-central/rev/33c90c196bc405e628bc868a4f4ba29b992478c0/devtools/client/framework/test/shared-head.js#179-185 The argument is not used. - remove the argument - udpate JSDoc - update all callers - rename method to refreshSelectedTab
Assignee | ||
Updated•7 years ago
|
Severity: normal → enhancement
Priority: -- → P3
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=84766303856478970c4dc71df042205f76cbca4d Ended up keeping the name and adding support for the argument as an optional thing. It's not used for now, but refreshSelectedTab felt like too many letters and not enough flexible, could bite us in the future.
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8931399 [details] Bug 1420179 - support tab argument in devtools shared-head refreshTab; https://reviewboard.mozilla.org/r/202530/#review207884 Seems legit ::: devtools/client/framework/test/shared-head.js:179 (Diff revision 1) > -var refreshTab = Task.async(function*(tab) { > +var refreshTab = Task.async(function* (tab) { > info("Refreshing tab."); > const finished = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser); > - gBrowser.reloadTab(gBrowser.selectedTab); > + gBrowser.reloadTab(tab || gBrowser.selectedTab); > yield finished; > info("Tab finished refreshing."); > }); since we're refactoring things, could this be transformed to a plain async await function ? ::: devtools/client/framework/test/shared-head.js:179 (Diff revision 1) > /** > - * Refresh the given tab. > - * @param {Object} tab The tab to be refreshed. > + * Refresh the provided tab. > + * @param {Object} tab The tab to be refreshed. Defaults to the currently selected tab. > * @return Promise<undefined> resolved when the tab is successfully refreshed. > */ > -var refreshTab = Task.async(function*(tab) { > +var refreshTab = Task.async(function* (tab) { could we use (tab = gBrowser.selectedTab) ?
Attachment #8931399 -
Flags: review?(nchevobbe) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•7 years ago
|
||
Thanks for the review, fixed the raised issues.
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dc14f9701349 support tab argument in devtools shared-head refreshTab;r=nchevobbe
Comment 7•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/dc14f9701349
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•