Closed Bug 1181838 Opened 9 years ago Closed 9 years ago

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

Categories

(DevTools :: Debugger, 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

(1 file)

We should import shared-head.js in debugger/test/head.js and remove any newly unnecessary code after that.
Bug 1181838 - Convert debugger tests to use shared-head.js;r=jlongster
Attachment #8682619 - Flags: review?(jlong)
There were a couple of special things with the debugger tests, but not as many as I thought.  Specifically, they use a different promise implementation and have some custom addTab / removeTab behavior.
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Summary: Migrate browser/devtools/debugger tests to shared-head.js → Migrate devtools/client/debugger tests to shared-head.js
Comment on attachment 8682619 [details]
MozReview Request: Bug 1181838 - Convert debugger tests to use shared-head.js;r=jlongster

https://reviewboard.mozilla.org/r/24115/#review22381

Looks great, sorely needed.

::: devtools/client/framework/test/shared-head.js:23
(Diff revision 1)
> -const promise = require("promise");
> +let promise = require("promise");

Why the change to `let`? I've seen const->var so that it exists in the global scope. Can this be set later on in the file?
Attachment #8682619 - Flags: review?(jlong) → review+
(In reply to James Long (:jlongster) from comment #3)
> Comment on attachment 8682619 [details]
> MozReview Request: Bug 1181838 - Convert debugger tests to use
> shared-head.js;r=jlongster
> 
> https://reviewboard.mozilla.org/r/24115/#review22381
> 
> Looks great, sorely needed.
> 
> ::: devtools/client/framework/test/shared-head.js:23
> (Diff revision 1)
> > -const promise = require("promise");
> > +let promise = require("promise");
> 
> Why the change to `let`? I've seen const->var so that it exists in the
> global scope. Can this be set later on in the file?

No reason in particular.  It seems to work fine (probably something with how the script loader works): https://treeherder.mozilla.org/#/jobs?repo=try&revision=20bffb29aeaa
Keywords: checkin-needed
To be clear, it had to change from const because the debugger tests would throw an error when trying to override it with its own promise implementation if it was a const.  When it's let (or var, I'm sure) the error doesn't happen and all is well.
https://hg.mozilla.org/mozilla-central/rev/9f30981c1fae
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: