Closed Bug 1255520 Opened 4 years ago Closed 4 years ago

BrowserTestUtils.withNewTab should just accept a url argument

Categories

(Testing :: Mochitest, defect)

defect
Not set

Tracking

(firefox48 fixed)

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: mossop, Assigned: mossop)

Details

Attachments

(1 file)

Most of the time the test just wants to open a page in the current window. In that case there is no need to pass an object with the gBrowser, we can just find it directly. This makes using this function less verbose in most cases.
Most of the time the test just wants to open a page in the current window. In
that case there is no need to pass an object with the gBrowser, we can just find
it directly. This makes using this function less verbose in most cases.

Review commit: https://reviewboard.mozilla.org/r/39237/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/39237/
Attachment #8729100 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8729100 [details]
MozReview Request: Bug 1255520: BrowserTestUtils.withNewTab should just accept a url argument. r?Gijs

https://reviewboard.mozilla.org/r/39237/#review35979

::: testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm:65
(Diff revision 1)
> +    if (typeof(options) == "string") {

I prefer typeof-the-operator (no () ) but I don't suppose that there's any rule against this notation...
Attachment #8729100 - Flags: review?(gijskruitbosch+bugs) → review+
Driveby nit: Could you update the method doc comment too?
https://hg.mozilla.org/mozilla-central/rev/31f70cb239b3
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Component: BrowserTest → Mochitest
You need to log in before you can comment on or make changes to this bug.