Closed
Bug 859241
Opened 11 years ago
Closed 11 years ago
Update addons.js and private-browsing.js to enhance the way .close() works
Categories
(Mozilla QA Graveyard :: Mozmill Tests, enhancement)
Mozilla QA Graveyard
Mozmill Tests
Tracking
(firefox21 fixed, firefox22 fixed, firefox23 fixed, firefox24 fixed, firefox-esr17 fixed)
People
(Reporter: mario.garbi, Assigned: mario.garbi)
References
Details
(Whiteboard: [lib])
Attachments
(2 files, 4 obsolete files)
5.24 KB,
patch
|
AndreeaMatei
:
review+
|
Details | Diff | Splinter Review |
1.56 KB,
patch
|
AndreeaMatei
:
review+
|
Details | Diff | Splinter Review |
Add a check to the close() method in addons.js so we verify if the Addons Manager is opened before we try to close it.
Assignee | ||
Comment 1•11 years ago
|
||
Mac OS 10.6.8 reports: http://mozmill-crowd.blargon7.com/#/functional/report/36bf148e4d23c6904e5ade75a48f564f http://mozmill-crowd.blargon7.com/#/functional/report/36bf148e4d23c6904e5ade75a49005a1 Linux Ubuntu 12.04 reports: http://mozmill-crowd.blargon7.com/#/functional/report/36bf148e4d23c6904e5ade75a48f3448 http://mozmill-crowd.blargon7.com/#/functional/report/36bf148e4d23c6904e5ade75a4902677
Attachment #734580 -
Flags: review?(andreea.matei)
Comment 2•11 years ago
|
||
In bug 786306 comment 66 I mentioned that the current behaviour is by design. Why are we changing it without further discussion? Also, looking at the patch I'm not sure I can see what value this is adding...
Assignee | ||
Comment 3•11 years ago
|
||
I'm sorry about not talking about this before posting it. It will fail with except.fail if we don't have an addons manager opened, and the try block catches any other failures. We could remove this if it's not desired or isn't useful, I was just trying to come up with a fix as suggested in bug 786306 comment 64.
Comment 4•11 years ago
|
||
(In reply to mario garbi from comment #3) > I'm sorry about not talking about this before posting it. It will fail with > except.fail if we don't have an addons manager opened, and the try block > catches any other failures. That's currently the expected behaviour. We even have a test for that scenario: http://hg.mozilla.org/qa/mozmill-tests/file/3000a00d0858/lib/tests/testAddonsManager.js#l91 > We could remove this if it's not desired or isn't useful, I was just trying > to come up with a fix as suggested in bug 786306 comment 64. I don't see this as something that needs fixing. I think it's reasonable to guard the close with an if statement in the teardown, as that will still allow us to fail within the tests if we try to close the addons manager when it is not open.
Assignee | ||
Updated•11 years ago
|
Summary: Update addons.js to enhance the way addonsManager.close() works → Update addons.js and private-browsing.js to enhance the way .close() works
Comment 5•11 years ago
|
||
Comment on attachment 734580 [details] [diff] [review] Patch v1.0 Review of attachment 734580 [details] [diff] [review]: ----------------------------------------------------------------- No longer needs review as we have established another way to do this.
Attachment #734580 -
Flags: review?(andreea.matei) → review-
Assignee | ||
Comment 6•11 years ago
|
||
WinXP: 23 http://mozmill-crowd.blargon7.com/#/functional/report/cb9e33213cf3d2f37d7b0f8dcc8978c6 http://mozmill-crowd.blargon7.com/#/functional/report/cb9e33213cf3d2f37d7b0f8dcc89831b 22 http://mozmill-crowd.blargon7.com/#/functional/report/cb9e33213cf3d2f37d7b0f8dcc89a3ae http://mozmill-crowd.blargon7.com/#/functional/report/cb9e33213cf3d2f37d7b0f8dcc899581 21 http://mozmill-crowd.blargon7.com/#/functional/report/cb9e33213cf3d2f37d7b0f8dcc89c33e http://mozmill-crowd.blargon7.com/#/functional/report/cb9e33213cf3d2f37d7b0f8dcc89b089 20 http://mozmill-crowd.blargon7.com/#/functional/report/cb9e33213cf3d2f37d7b0f8dcc89c6ee http://mozmill-crowd.blargon7.com/#/functional/report/cb9e33213cf3d2f37d7b0f8dcc89d6d7
Attachment #734580 -
Attachment is obsolete: true
Attachment #736800 -
Flags: review?(andreea.matei)
Assignee | ||
Comment 7•11 years ago
|
||
Linux - Nightly 23 http://mozmill-crowd.blargon7.com/#/functional/report/8ec48e7ab0431a61b624e36d312e12ab http://mozmill-crowd.blargon7.com/#/functional/report/8ec48e7ab0431a61b624e36d312e7f91 Mac - Nightly 23 http://mozmill-crowd.blargon7.com/#/functional/report/8ec48e7ab0431a61b624e36d3131442c http://mozmill-crowd.blargon7.com/#/functional/report/8ec48e7ab0431a61b624e36d3131bc84
Comment 8•11 years ago
|
||
Comment on attachment 736800 [details] [diff] [review] patch v1.1 Review of attachment 736800 [details] [diff] [review]: ----------------------------------------------------------------- You can add reports for Nightly only until that one has landed, no need for the rest atm. ::: lib/addons.js @@ +202,5 @@ > /** > * Close the Addons Manager > + * @param {boolean} aAssertSuccess > + * Boolean value that decides how we handle Addons Manager already > + * being closed Please find a better description here, one that mentions what is 'true' used for (mostly we'll be using it in teardowns()). @@ +219,5 @@ > aomTabs[0].controller.waitForPageLoad(); > } > } > catch (ex) { > + if(!aAssertSuccess){ Spaces needed after if and between ')' and '{' ::: lib/ui/private-browsing.js @@ +134,2 @@ > > + //Try to close the window in case it is not already closed This message can be moved now outside the try block and needs a space after '//'.
Attachment #736800 -
Flags: review?(andreea.matei) → review-
Comment 9•11 years ago
|
||
Comment on attachment 736800 [details] [diff] [review] patch v1.1 Review of attachment 736800 [details] [diff] [review]: ----------------------------------------------------------------- ::: lib/ui/private-browsing.js @@ +142,5 @@ > + }, "A private browsing window has been closed"); > + } > + catch (ex) { > + if (!aAssertSuccess) { > + throw new Error(arguments.callee.name + ": Private Browsing Window has been closed."); Please don't make use of `arguments.callee.name` anymore given that we will not be able to use it anymore once we have turned on strict mode. Just take the message as parameter. That's enough.
Assignee | ||
Comment 10•11 years ago
|
||
Windows XP : http://mozmill-crowd.blargon7.com/#/functional/report/8ec48e7ab0431a61b624e36d31edf6d9 http://mozmill-crowd.blargon7.com/#/functional/report/8ec48e7ab0431a61b624e36d31ee1ff1 Linux: http://mozmill-crowd.blargon7.com/#/functional/report/8ec48e7ab0431a61b624e36d31ee20d9 http://mozmill-crowd.blargon7.com/#/functional/report/8ec48e7ab0431a61b624e36d31ee9283 Mac 10.6.8: http://mozmill-crowd.blargon7.com/#/functional/report/8ec48e7ab0431a61b624e36d31eead8c http://mozmill-crowd.blargon7.com/#/functional/report/8ec48e7ab0431a61b624e36d31ef063d
Attachment #736800 -
Attachment is obsolete: true
Attachment #738930 -
Flags: review?(andreea.matei)
Comment 11•11 years ago
|
||
Comment on attachment 738930 [details] [diff] [review] Patch v1.2 Review of attachment 738930 [details] [diff] [review]: ----------------------------------------------------------------- Only a small thing left that was not addressed and also the commit message is outdated. ::: lib/addons.js @@ +219,5 @@ > aomTabs[0].controller.waitForPageLoad(); > } > } > catch (ex) { > + if(!aAssertSuccess) { Still missing a space after if and the condition
Attachment #738930 -
Flags: review?(andreea.matei) → review-
Assignee | ||
Comment 12•11 years ago
|
||
Modified the commit message and indentation issue. Thank you.
Attachment #738930 -
Attachment is obsolete: true
Attachment #739048 -
Flags: review?(andreea.matei)
Comment 13•11 years ago
|
||
Comment on attachment 739048 [details] [diff] [review] Patch v1.3 Review of attachment 739048 [details] [diff] [review]: ----------------------------------------------------------------- ::: lib/addons.js @@ +201,5 @@ > > /** > * Close the Addons Manager > + * @param {boolean} aAssertSuccess > + * Boolean value that sets the function to ignore failures if true This sounds backwards to me.. 'assert success' should mean that we throw if unsuccessful, not that we ignore.
Attachment #739048 -
Flags: review?(andreea.matei) → review-
Assignee | ||
Comment 14•11 years ago
|
||
From the discutions on IRC I've understood that we want the close() method to have the boolean value default to false, if we only throw errors when the value is set to true then we end up ignoring closing issues and I was under the impression we do not want that. I could either change the name of the parameter into something more appropriate or change the way we handle close() so that we ignore failures with default false. The later might involve refactoring if we want to keep throwing errors when close fails.
Comment 15•11 years ago
|
||
(In reply to mario garbi from comment #14) > From the discutions on IRC I've understood that we want the close() method > to have the boolean value default to false, if we only throw errors when the > value is set to true then we end up ignoring closing issues and I was under > the impression we do not want that. > > I could either change the name of the parameter into something more > appropriate or change the way we handle close() so that we ignore failures > with default false. The later might involve refactoring if we want to keep > throwing errors when close fails. You are correct in that the default should be false, and the default behaviour should be as it currently is (assert success). We will only want to set it to true (don't assert success) when we're in teardown. In this case the argument would need to be aIgnoreFailures or similar. Either way we need the name of the argument to reflect the behaviour, which is not the case in your current patch.
Assignee | ||
Comment 16•11 years ago
|
||
Changed the parameter name as requested, to better reflect the behavior.
Attachment #739048 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #739530 -
Flags: review?(andreea.matei)
Comment 17•11 years ago
|
||
Comment on attachment 739530 [details] [diff] [review] patch v1.4 Review of attachment 739530 [details] [diff] [review]: ----------------------------------------------------------------- Landed as: http://hg.mozilla.org/qa/mozmill-tests/rev/68b574aaf5f2 (default)
Attachment #739530 -
Flags: review?(andreea.matei) → review+
Updated•11 years ago
|
status-firefox20:
--- → affected
status-firefox21:
--- → affected
status-firefox22:
--- → affected
status-firefox23:
--- → fixed
status-firefox-esr17:
--- → affected
Whiteboard: [lib]
Assignee | ||
Comment 18•11 years ago
|
||
Backport reports for Aurora: WinXP: http://mozmill-crowd.blargon7.com/#/functional/report/452ec32f8deec0960aea87aa06e9a045 http://mozmill-crowd.blargon7.com/#/functional/report/452ec32f8deec0960aea87aa06e98b11 Linux Ubuntu 12.04: http://mozmill-crowd.blargon7.com/#/functional/report/452ec32f8deec0960aea87aa06e9942b http://mozmill-crowd.blargon7.com/#/functional/report/452ec32f8deec0960aea87aa06e9ad3d Mac 10.6.8: http://mozmill-crowd.blargon7.com/#/functional/report/452ec32f8deec0960aea87aa06e9bc75 http://mozmill-crowd.blargon7.com/#/functional/report/452ec32f8deec0960aea87aa06e9bd00
Assignee | ||
Comment 19•11 years ago
|
||
The reports above used the same patch as Default.
Assignee | ||
Comment 20•11 years ago
|
||
Backport reports for Beta: WinXP: http://mozmill-crowd.blargon7.com/#/functional/report/ea82256a8ae9808d91b7e8145ec88c4f http://mozmill-crowd.blargon7.com/#/functional/report/ea82256a8ae9808d91b7e8145ec8a7d4 Linux 12.04: http://mozmill-crowd.blargon7.com/#/functional/report/ea82256a8ae9808d91b7e8145ec88e12 http://mozmill-crowd.blargon7.com/#/functional/report/ea82256a8ae9808d91b7e8145ec8aaa6 Mac 10.6.8: http://mozmill-crowd.blargon7.com/#/functional/report/ea82256a8ae9808d91b7e8145ec89823 http://mozmill-crowd.blargon7.com/#/functional/report/ea82256a8ae9808d91b7e8145ec8ae79
Assignee | ||
Comment 21•11 years ago
|
||
For ESR17 and release I will come with a different patch since there are some issues.
Assignee | ||
Comment 22•11 years ago
|
||
This patch works with ESR17 only, for Release we have some issues with Release 20 build.The code implemented in Bug 834632 (for 21) seems to have landed on Release Branch, for which we still have build 20.0.1 as latest. Basically the patch for bug 834632 adds a pluginState check of a label that doesn't exists in 20.0.1 and this causes the tests to fail with "pluginState[i] is undefined". As release 21 is around the corner we could simply wait for it to land and release branch will work ok again. Release reports: WinXP: http://mozmill-crowd.blargon7.com/#/functional/report/ea82256a8ae9808d91b7e8145ec8f3bb http://mozmill-crowd.blargon7.com/#/functional/report/ea82256a8ae9808d91b7e8145ec93c01 Linux 12.04: http://mozmill-crowd.blargon7.com/#/functional/report/ea82256a8ae9808d91b7e8145ec91587 http://mozmill-crowd.blargon7.com/#/functional/report/ea82256a8ae9808d91b7e8145ec9a3d2 Mac 10.6.8: http://mozmill-crowd.blargon7.com/#/functional/report/ea82256a8ae9808d91b7e8145ec91be1 http://mozmill-crowd.blargon7.com/#/functional/report/ea82256a8ae9808d91b7e8145ec9a6ec
Attachment #748771 -
Flags: review?
Assignee | ||
Updated•11 years ago
|
Attachment #748771 -
Flags: review? → review?(andreea.matei)
Assignee | ||
Comment 23•11 years ago
|
||
ESR17 reports - Mac 10.6.8: http://mozmill-crowd.blargon7.com/#/functional/report/14f8bc4e22e61353662cded4c231b326 http://mozmill-crowd.blargon7.com/#/functional/report/14f8bc4e22e61353662cded4c231d1a1 WinXP: http://mozmill-crowd.blargon7.com/#/functional/report/14f8bc4e22e61353662cded4c231ab53 http://mozmill-crowd.blargon7.com/#/functional/report/14f8bc4e22e61353662cded4c231ca90 Linux: http://mozmill-crowd.blargon7.com/#/functional/report/14f8bc4e22e61353662cded4c231c270 http://mozmill-crowd.blargon7.com/#/functional/report/14f8bc4e22e61353662cded4c231d2ec
Assignee | ||
Comment 24•11 years ago
|
||
Release 21 reports, all green Mac: http://mozmill-crowd.blargon7.com/#/functional/report/14f8bc4e22e61353662cded4c231f42d http://mozmill-crowd.blargon7.com/#/functional/report/14f8bc4e22e61353662cded4c2320384 WinXP: http://mozmill-crowd.blargon7.com/#/functional/report/14f8bc4e22e61353662cded4c231e786 http://mozmill-crowd.blargon7.com/#/functional/report/14f8bc4e22e61353662cded4c231f9f0 Linux: http://mozmill-crowd.blargon7.com/#/functional/report/14f8bc4e22e61353662cded4c231f71c http://mozmill-crowd.blargon7.com/#/functional/report/14f8bc4e22e61353662cded4c2320a6a
Comment 25•11 years ago
|
||
Comment on attachment 748771 [details] [diff] [review] patch v1.4 ESR17 Review of attachment 748771 [details] [diff] [review]: ----------------------------------------------------------------- Aurora was merged, here are the rest: http://hg.mozilla.org/qa/mozmill-tests/rev/631893229b1d (beta) http://hg.mozilla.org/qa/mozmill-tests/rev/cc020e6123fa (release) http://hg.mozilla.org/qa/mozmill-tests/rev/9d5d7a907c7e (esr17) Thanks!
Attachment #748771 -
Flags: review?(andreea.matei) → review+
Updated•11 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
status-firefox20:
affected → ---
status-firefox24:
--- → fixed
Resolution: --- → FIXED
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
•