Closed Bug 976986 Opened 12 years ago Closed 12 years ago

SettingsListener should have unobserve() method

Categories

(Firefox OS Graveyard :: Gaia, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dwi2, Assigned: dwi2)

References

Details

(Whiteboard: [in-bubble-tea])

Attachments

(2 files, 1 obsolete file)

Some classes of system app 'observe' some setting values but unable to 'unobserve' them, this make unit tests of these class difficult to read and to write. And 'unobserve()' method should be existed to be pair of 'observe()' from design point of view.
it's a follow-up of bug 971498
Assignee: nobody → tzhuang
Blocks: 976998
Attached file pull request
a WIP patch, I am still working on the unit test of it
Comment on attachment 8388281 [details] [review] pull request Hi Alive, Please help to review the patch, Thanks.
Attachment #8388281 - Attachment description: WIP patch → pull request
Attachment #8388281 - Flags: review?(alive)
Comment on attachment 8388281 [details] [review] pull request I should ask for review from Tim because he is the original author.
Attachment #8388281 - Flags: review?(timdream)
Attachment #8388281 - Flags: review?(alive)
Attachment #8388281 - Flags: feedback?(alive)
Comment on attachment 8388281 [details] [review] pull request The code itself is fine. I would like to see setTimeout() in mock_navigator_moz_settings.js in being removed, instead of being workaround'd with fake timers. We shouldn't simulate async operation with setTimeout(). I won't object if that's being done in the next bug though.
Attachment #8388281 - Flags: review?(timdream) → review+
Hi Tim, I filed a follow up bug in order to remove all async method/DOM request simulated timers in unit test - bug 982544. And bubble-tea is freezed now, I'll land this patch to master once bubble-tea merge into master.
Attached file pull request against master (obsolete) —
Old PR to bubble-tea is obsolete because branch bubble-tea is freezed. I made a new PR to master with exact the same patch, but I still need Tim's review+ before landing the patch
Attachment #8388281 - Attachment is obsolete: true
Attachment #8388281 - Flags: feedback?(alive)
Attachment #8390974 - Flags: review?(timdream)
Comment on attachment 8390974 [details] [review] pull request against master You should land on bubble-tea, don't worry about it.
Attachment #8390974 - Flags: review?(timdream)
Attachment #8388281 - Attachment is obsolete: false
Attachment #8390974 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: