Closed Bug 1081851 Opened 11 years ago Closed 11 years ago

Add tabBrowser instance in the BrowserWindow class

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect, P1)

defect

Tracking

(firefox32 wontfix, firefox33 wontfix, firefox34 fixed, firefox35 fixed, firefox36 fixed, firefox-esr31 wontfix)

RESOLVED FIXED
Tracking Status
firefox32 --- wontfix
firefox33 --- wontfix
firefox34 --- fixed
firefox35 --- fixed
firefox36 --- fixed
firefox-esr31 --- wontfix

People

(Reporter: danisielm, Assigned: danisielm)

References

Details

(Whiteboard: [sprint])

Attachments

(1 file, 2 obsolete files)

As discussed in bug 1079725, we should add an instance of tabBrowser in the BrowserWindow class. Also consider it being lazily loaded in the class.
Attached patch v1.patch (obsolete) — Splinter Review
Attachment #8504108 - Flags: review?(andrei.eftimie)
Attachment #8504108 - Flags: review?(andreea.matei)
Comment on attachment 8504108 [details] [diff] [review] v1.patch Review of attachment 8504108 [details] [diff] [review]: ----------------------------------------------------------------- Just 2 small issues. ::: firefox/lib/tests/testBrowserWindow.js @@ +56,5 @@ > + browserWindow.tabs.openTab(); > + > + expect.equal(browserWindow.tabs.length, > + length + 2, > + "Tabs have been successfully open"); With this please also add a closeAllTabs call in teardown ::: firefox/lib/ui/browser.js @@ +43,5 @@ > + if (!this._tabs) { > + this._tabs = new tabs.tabBrowser(this._controller) > + } > + > + return this._tabs; You can simplify this whole method: > return this._tabs || new tabs.tabBrowser(this._controller);
Attachment #8504108 - Flags: review?(andrei.eftimie)
Attachment #8504108 - Flags: review?(andreea.matei)
Attachment #8504108 - Flags: review-
Attached patch v2.patch (obsolete) — Splinter Review
Thanks, updated and passed review to Henrik.
Attachment #8504108 - Attachment is obsolete: true
Attachment #8504671 - Flags: review?(hskupin)
Whiteboard: [sprint]
Comment on attachment 8504671 [details] [diff] [review] v2.patch Review of attachment 8504671 [details] [diff] [review]: ----------------------------------------------------------------- ::: firefox/lib/ui/browser.js @@ +38,5 @@ > + * Get the tabBrowser of the current browser window > + * > + * @returns {object} Tab browser of the window > + */ > +BrowserWindow.prototype.__defineGetter__('tabs', function() { nit: missing blank after 'function'
Attachment #8504671 - Flags: review?(hskupin) → review+
Attached patch v2.1.patchSplinter Review
Thanks Henrik! Patch updated, applies cleanly on default, aurora & beta.
Attachment #8504671 - Attachment is obsolete: true
Attachment #8505309 - Flags: review?(andrei.eftimie)
Attachment #8505309 - Flags: review?(andreea.matei)
Attachment #8505309 - Flags: checkin?
Comment on attachment 8505309 [details] [diff] [review] v2.1.patch Review of attachment 8505309 [details] [diff] [review]: ----------------------------------------------------------------- http://hg.mozilla.org/qa/mozmill-tests/rev/16526b00657f (default) I'll backport later today.
Attachment #8505309 - Flags: review?(andrei.eftimie)
Attachment #8505309 - Flags: review?(andreea.matei)
Attachment #8505309 - Flags: review+
Attachment #8505309 - Flags: checkin?
Attachment #8505309 - Flags: checkin+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: