Closed Bug 747308 Opened 12 years ago Closed 12 years ago

getInstalledAddons should filter the callback

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: remus.pop, Assigned: remus.pop)

References

Details

(Whiteboard: [lib])

Attachments

(1 file, 1 obsolete file)

function getInstalledAddons(callbackFilter) from addons module does not filter the results from the callback(simply said the callback cannot work as a filter). So we should only push data to the table if the callback is true.
Blocks: 739935
Attached patch proposed v1 (all branches) (obsolete) — Splinter Review
The result from the callback will be stored in a local variable. Data will be added to the array if the variable contains something (not null, not undefined, not 0).
Assignee: nobody → remus.pop
Status: NEW → ASSIGNED
Attachment #616949 - Flags: review?(hskupin)
Any bugs for Shared Modules go in the Mozilla QA :: Mozmill Shared Modules component.
Assignee: remus.pop → nobody
Component: Mozmill Tests → Mozmill Shared Modules
QA Contact: mozmill-tests → mozmill-shared-modules
Whiteboard: [lib]
Sorry, I got carried away by bug 714802 and others.
(In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #2)
> Any bugs for Shared Modules go in the Mozilla QA :: Mozmill Shared Modules
> component.

No, it does not. Please see my message on the public mailing list. Two days ago all of the shared module bugs have been carried over to tests and the component will be abandoned early next week.
Component: Mozmill Shared Modules → Mozmill Tests
QA Contact: mozmill-shared-modules → mozmill-tests
Assignee: nobody → remus.pop
Can you please link me to the post? I don't understand why we want to make things more ambiguous.
(In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #5)
> Can you please link me to the post? I don't understand why we want to make
> things more ambiguous.

Henrik pointed me to the post on IRC, sharing here for historical context:
http://groups.google.com/group/mozilla.dev.automation/browse_thread/thread/cae651d706e51b3e#

Going forward, please use the [mozmill-shared-module] whiteboard tag.
Whiteboard: [mozmill-shared-module]
(In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #6)
> Going forward, please use the [mozmill-shared-module] whiteboard tag.

This is 'lib' now as you can see in all the other bugs about modules under the lib folder.
Whiteboard: [mozmill-shared-module] → [lib]
Comment on attachment 616949 [details] [diff] [review]
proposed v1 (all branches)

>   AddonManager.getAllAddons(function (aAddons) {
>     if (callbackFilter == undefined) {
>       addonInfo = aAddons;
>     } else {

While you are on it, can you please push the else to a new line? Otherwise it looks good.
Attachment #616949 - Flags: review?(hskupin) → review+
Else has been moved to a new line.
Attachment #616949 - Attachment is obsolete: true
Attachment #617807 - Flags: review?(hskupin)
Comment on attachment 617807 [details] [diff] [review]
patch v2 (all branches)

Looks good. Thanks Remus.
Attachment #617807 - Flags: review?(hskupin) → review+
Given that this feature blocks a failure I have landed the patch across branches:

http://hg.mozilla.org/qa/mozmill-tests/rev/ab1cb77d7d31 (default)
http://hg.mozilla.org/qa/mozmill-tests/rev/20895ce40855 (aurora)
http://hg.mozilla.org/qa/mozmill-tests/rev/01195f17c569 (beta)
http://hg.mozilla.org/qa/mozmill-tests/rev/5393c9b4fa39 (release)
http://hg.mozilla.org/qa/mozmill-tests/rev/2909e4a74f7c (esr10)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
(In reply to Henrik Skupin (:whimboo) from comment #7)
> (In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #6)
> > Going forward, please use the [mozmill-shared-module] whiteboard tag.
> 
> This is 'lib' now as you can see in all the other bugs about modules under
> the lib folder.

I would much prefer that you use [mozmill-shared-module] so that it is in line with the nomenclature of all our other mozmill* whiteboard tags.
It's not a debate I want to have on a bug. Feel free to start a discussion on the newsgroup if still necessary but in short, the other whiteboard tags have a mozmill prefix because of their usage outside of the mozmill-tests component. 'lib' related bugs will always stay inside. Also I wouldn't use 'shared-module' anymore because the folder isn't named that way anymore and will only cause confusion.
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: