Closed Bug 1181852 Opened 9 years ago Closed 9 years ago

Migrate devtools/client/shared tests to shared-head.js

Categories

(DevTools :: Framework, defect)

defect
Not set
normal

Tracking

(firefox42 affected, firefox45 fixed)

RESOLVED FIXED
Firefox 45
Tracking Status
firefox42 --- affected
firefox45 --- fixed

People

(Reporter: bgrins, Assigned: bgrins)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

We should import shared-head.js in shared/test/head.js and remove any newly unnecessary code after that.
Summary: Migrate browser/devtools/shared tests to shared-head.js → Migrate devtools/client/shared tests to shared-head.js
Bug 1181852 - Use shared-head.js for devtools/client/shared;r=jryans
Attachment #8685239 - Flags: review?(jryans)
Comment on attachment 8685239 [details]
MozReview Request: Bug 1181852 - Use shared-head.js for devtools/client/shared;r=jryans

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/24765/diff/1-2/
(In reply to Brian Grinstead [:bgrins] from comment #1)
> Created attachment 8685239 [details]
> MozReview Request: Bug 1181852 - Use shared-head.js for
> devtools/client/shared;r=jryans
> 
> Bug 1181852 - Use shared-head.js for devtools/client/shared;r=jryans

Most of the diff is replacing promiseTab with addTab.. The interesting parts are in head.js and then a few tests that were using the old addTab implementation that took in a callback.  For a couple I've converted to add_task, and one was too scary to touch so I just changed it to be addTab(..).then(callback).

Sorry for the size of the diff, I realize now that I should have done the promiseTab part in another step.
Comment on attachment 8685239 [details]
MozReview Request: Bug 1181852 - Use shared-head.js for devtools/client/shared;r=jryans

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/24765/diff/2-3/
Bug 1181852 - Replace all instances of promiseTab with addTab (just to make review easier, this will be squashed);r=jryans
Attachment #8685242 - Flags: review?(jryans)
There we go, I've split the big find/replace out into the second patch so hopefully the first is easier to review
Comment on attachment 8685239 [details]
MozReview Request: Bug 1181852 - Use shared-head.js for devtools/client/shared;r=jryans

https://reviewboard.mozilla.org/r/24765/#review22331

::: devtools/client/shared/test/head.js:95
(Diff revision 3)
>  function oneTimeObserve(name, callback) {

Should we extend `once` in shared head to support observers so this can be removed?
Attachment #8685239 - Flags: review?(jryans) → review+
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Comment on attachment 8685242 [details]
MozReview Request: Bug 1181852 - Replace all instances of promiseTab with addTab (just to make review easier, this will be squashed);r=jryans

https://reviewboard.mozilla.org/r/24771/#review22333
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #7)
> Comment on attachment 8685239 [details]
> MozReview Request: Bug 1181852 - Use shared-head.js for
> devtools/client/shared;r=jryans
> 
> https://reviewboard.mozilla.org/r/24765/#review22331
> 
> ::: devtools/client/shared/test/head.js:95
> (Diff revision 3)
> >  function oneTimeObserve(name, callback) {
> 
> Should we extend `once` in shared head to support observers so this can be
> removed?

We discussed on #devtools and will wait to see if there is another directory that uses something similar as part of Bug 1181833.. If so we'll pull that into the shared file (either by passing Services.obs as a param to once or as a new function)
https://hg.mozilla.org/mozilla-central/rev/f65cfe891fe8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: