Closed
Bug 1071548
Opened 10 years ago
Closed 7 years ago
BrowserWindow class misses close() method
Categories
(Mozilla QA Graveyard :: Mozmill Tests, defect, P2)
Mozilla QA Graveyard
Mozmill Tests
Tracking
(firefox32 wontfix, firefox33 wontfix, firefox34 affected, firefox35 affected, firefox-esr31 wontfix)
People
(Reporter: whimboo, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
4.54 KB,
patch
|
whimboo
:
review-
|
Details | Diff | Splinter Review |
The BrowserWindow class as implemented in bug 1047235 is missing its own close() method. It should overwrite the BaseWindow close() method by allowing to specify the menu, shortcut etc. Itself it can then call the BaseWindow method with its own callback. Daniel, would you mind getting this implemented. It will help us in tests where we have to handle multiple windows.
Updated•10 years ago
|
Assignee: nobody → daniel.gherasim
Comment 1•10 years ago
|
||
Up for review! :)
Attachment #8494434 -
Flags: review?(andrei.eftimie)
Attachment #8494434 -
Flags: review?(andreea.matei)
Updated•10 years ago
|
status-firefox32:
--- → wontfix
status-firefox33:
--- → wontfix
status-firefox34:
--- → affected
status-firefox35:
--- → affected
status-firefox-esr31:
--- → wontfix
Updated•10 years ago
|
Status: NEW → ASSIGNED
Comment 2•10 years ago
|
||
Comment on attachment 8494434 [details] [diff] [review] fix_v1.patch Review of attachment 8494434 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the nit fixed. ::: firefox/lib/ui/browser.js @@ +58,5 @@ > + case "menu": > + callback = () => { this._controller.mainMenu.click("#menu_closeWindow"); } > + break; > + case "shortcut": > + var closeWindowKey = utils.getEntity(this.dtds, "closeWindow.key"); nit: indentation is a bit off
Attachment #8494434 -
Flags: review?(andrei.eftimie)
Attachment #8494434 -
Flags: review?(andreea.matei)
Attachment #8494434 -
Flags: review+
Comment 3•10 years ago
|
||
Done!
Attachment #8494434 -
Attachment is obsolete: true
Attachment #8497416 -
Flags: review?(hskupin)
Reporter | ||
Comment 4•10 years ago
|
||
Comment on attachment 8497416 [details] [diff] [review] fix_v2.patch Review of attachment 8497416 [details] [diff] [review]: ----------------------------------------------------------------- ::: firefox/lib/ui/browser.js @@ +22,5 @@ > this._controller = aController || mozmill.getBrowserController(); > this._dtds = ["chrome://branding/locale/brand.dtd", > "chrome://browser/locale/browser.dtd", > + "chrome://browser/locale/aboutPrivateBrowsing.dtd", > + "chrome://browser/locale/pageInfo.dtd"]; Mind helping me why we need this extra DTD file? @@ +27,4 @@ > } > > BrowserWindow.prototype = new baseWindow.BaseWindow(true); > BrowserWindow.prototype.constructor = BrowserWindow; Do you mind changing this to Object.create() similar to the latest software update changes? Anything else about inheritance we will discuss on the other bug. @@ +44,5 @@ > + * Define new function that closes the window > + * @param {boolean} [aSpec.force=false] > + * Force closing the window > + */ > +BrowserWindow.prototype.close = function BrowserWindow_close(aSpec={}) { nit: To reduce the line length we should use the prefix 'BW_' for the internal name. @@ +50,5 @@ > + var callback = null; > + > + if (aSpec.force) { > + baseWindow.BaseWindow.prototype.close.call(this); > + return; Why are you not waiting for the observer notifications here? @@ +62,5 @@ > + var closeWindowKey = utils.getEntity(this.dtds, "closeWindow.key"); > + callback = () => { > + this._controller.keypress(null, closeWindowKey, {accelKey: true, > + shiftKey: true}); > + } I like the definition of the individual callback methods. Can we do the same for the open() method too?
Attachment #8497416 -
Flags: review?(hskupin) → review-
Updated•9 years ago
|
Assignee: danisielm → nobody
Status: ASSIGNED → NEW
Reporter | ||
Comment 5•7 years ago
|
||
Mozmill tests have been superseded by Marionette tests.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Updated•5 years ago
|
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•