Closed
Bug 971554
Opened 12 years ago
Closed 11 years ago
[System2] Instantiable SoundManager
Categories
(Firefox OS Graveyard :: Gaia::System, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: alive, Assigned: johnhu)
References
Details
(Whiteboard: [in-bubble-tea])
Attachments
(2 files, 3 obsolete files)
We need sound_manager.js to be instantiable and let bootstrap or its parent module to instantiate it.
Also jsdoc + unit test improvement wanted.
Updated•11 years ago
|
Assignee: nobody → johu
Assignee | ||
Comment 1•11 years ago
|
||
Alive,
I found the mute behavior is inconsistent at [1]. It only mutes notification while muting but unmutes both notification and content while unmuting.
Should we mute both of them and unmuting both of them?
[1] https://github.com/mozilla-b2g/gaia/blob/f1f99c6f880d2adbf5886a8dbe6345141c2d5626/apps/system/js/sound_manager.js#L29-L50
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(alive)
Assignee | ||
Comment 2•11 years ago
|
||
A WIP patch can be found here:
https://github.com/huchengtw-moz/gaia/commit/4e2b4eb3a363f2ee644a0d963032153cddb25de9
Reporter | ||
Comment 3•11 years ago
|
||
Please do not change the behavior, it's by design.
Flags: needinfo?(alive)
Assignee | ||
Comment 4•11 years ago
|
||
Assignee | ||
Comment 5•11 years ago
|
||
These two PR are exactly the same but for different branch.
Change items:
1. rewrap the SoundManager as a class, no behavior changed.
2. add about 20 unit tests for SoundManager
3. update bootstrap.js and bootstrap_test.js
4. add MockSoundManager
5. fix jshint of SoundManager
Attachment #8381170 -
Flags: review?(alive)
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 8381170 [details] [review]
PR for master
clear review flag for checking the jsdoc parts.
Attachment #8381170 -
Flags: review?(alive)
Assignee | ||
Comment 7•11 years ago
|
||
Comment on attachment 8381167 [details] [review]
patch for bubble tea
Hi alive,
I had changed the patch to enable the jsdoc generation of SoundManager. Please review this version. Thanks.
Attachment #8381167 -
Flags: review?(alive)
Assignee | ||
Comment 8•11 years ago
|
||
Comment on attachment 8381170 [details] [review]
PR for master
Since our patches go to bubble tea, we don't need this one.
Attachment #8381170 -
Attachment is obsolete: true
Reporter | ||
Comment 9•11 years ago
|
||
Comment on attachment 8381167 [details] [review]
patch for bubble tea
Nice big work. r+ with nits. Thanks!
Attachment #8381167 -
Flags: review?(alive) → review+
Assignee | ||
Comment 10•11 years ago
|
||
merged to bubble-tea:
https://github.com/mozilla-b2g/gaia/commit/99fcb153535a3e846f0df2a8b0752d85cc1f975e
Whiteboard: [in-bubble-tea]
Comment 11•11 years ago
|
||
Comment 12•11 years ago
|
||
travis all green, merged https://github.com/mozilla-b2g/gaia/commit/c377f41d017d4b099e92fd7ecf67d9cd1cee1292
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 13•11 years ago
|
||
Thanks Fred,
This is a hard bug....
I had to revert this in https://github.com/mozilla-b2g/gaia/commit/34cdf08e963c1fde841828b69ae02fab43828573 for breaking gaia-unit tests on TBPL:
https://tbpl.mozilla.org/php/getParsedLog.php?id=36588967&tree=B2g-Inbound
Assignee | ||
Comment 15•11 years ago
|
||
Reopen it because of comment 14.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 16•11 years ago
|
||
Comment on attachment 8381170 [details] [review]
PR for master
Rebase to master.
travis all green: https://travis-ci.org/mozilla-b2g/gaia/builds/21645503
Attachment #8381170 -
Attachment is obsolete: false
Comment 17•11 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Comment 18•11 years ago
|
||
Sorry, I accidentally committed some bad changesets to the Gaia repo which you had the misfortunate of pushing on top of. Rather than trying to rebase it all around, I ended up just reverting to the last good changeset, which means your push got lost. I'm *VERY* sorry for the inconvenience I've caused you :(
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 19•11 years ago
|
||
reland to master:
https://github.com/mozilla-b2g/gaia/commit/eee964fc7e8dc519218dee6b72595ad0f7dd8231
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Comment 20•11 years ago
|
||
(In reply to John Hu [:johnhu][:johu][:醬糊小弟] from comment #19)
> reland to master:
> https://github.com/mozilla-b2g/gaia/commit/
> eee964fc7e8dc519218dee6b72595ad0f7dd8231
i think this have broken marionette tests again
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 21•11 years ago
|
||
yeah red mnw tests results started with this push - https://tbpl.mozilla.org/php/getParsedLog.php?id=36982015&tree=B2g-Inbound
Assignee | ||
Comment 22•11 years ago
|
||
the commit eee964fc7e8dc519218dee6b72595ad0f7dd8231 is reverted.
Assignee | ||
Comment 23•11 years ago
|
||
PR: https://github.com/mozilla-b2g/gaia/pull/17807
reland to master: https://github.com/mozilla-b2g/gaia/commit/3c23b5013e62d6f059d9a0b9f9e8c8db0c3aa2fe
travis is all green: https://travis-ci.org/mozilla-b2g/gaia/builds/21990686
I had tried try-server. But it gives me timed-out all the time:
Bug 982995 - Intermittent TEST-UNEXPECTED-FAIL | test_sms_add_contact.py test_sms_add_contact.TestSmsAddContact.test_sms_add_contact | (after TimeoutException: TimeoutException: Timed out after 10.0 seconds)
TEST-UNEXPECTED-FAIL | test_context_menu_activity_picker.py test_context_menu_activity_picker.TestContextMenuActivityPicker.test_context_menu_activity_picker |
Assignee | ||
Updated•11 years ago
|
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Comment 24•11 years ago
|
||
Reverted for causing bug 991385.
https://github.com/mozilla-b2g/gaia/commit/d9a574284d672f532f7c562a091bb01f531202b1
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 25•11 years ago
|
||
Request to review the patch because a regression of previous patch is fixed.
The change between this one and https://github.com/mozilla-b2g/gaia/pull/17807 is at line 349[1] which calls this.headsetVolumeup() only when user volumes up and the headset is plugged in.
[1] https://github.com/mozilla-b2g/gaia/pull/18007/files#diff-6cb5950c74c73ee2f0c39a8b418d1548R349
Attachment #8381167 -
Attachment is obsolete: true
Attachment #8381170 -
Attachment is obsolete: true
Attachment #8395483 -
Attachment is obsolete: true
Attachment #8402483 -
Flags: review?(alive)
Reporter | ||
Comment 26•11 years ago
|
||
Comment on attachment 8402483 [details] [review]
patch for master
r+ if you have unit tests for the failure.
Attachment #8402483 -
Flags: review?(alive) → review+
Comment 27•11 years ago
|
||
This is r+, Travis green, and it may be blocking/conflicting with bug 1006356, what are we waiting to land this?
Comment 28•11 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #27)
> This is r+, Travis green, and it may be blocking/conflicting with bug
> 1006356, what are we waiting to land this?
1006356 is a cert blocker for 1.3 so we shouldn't delay it with merging this in the next 24 hours. Lets coordinate if you want to land this in the next few days.
Assignee | ||
Comment 29•11 years ago
|
||
We got a call to post-pone the landing of System2. We will try to resolve it after bug 1006356 landed.
Comment 30•11 years ago
|
||
I'm concerned this has not yet landed ; it's blocking writing new tests, as of bug 1011000.
Flags: needinfo?(johu)
Assignee | ||
Comment 31•11 years ago
|
||
Alexandre,
The PR had rebased. I had discussed this one with Tim. We will not land this patch until the gaia-try green, and I will dogfeed this patch at least a week before landing it.
It is welcome that you may help to test this patch on your site.
Flags: needinfo?(johu)
Assignee | ||
Comment 32•11 years ago
|
||
merged to master:
https://github.com/mozilla-b2g/gaia/commit/9d822c4666c507da8ffe9967df530aa6980acbf8
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Comment 33•11 years ago
|
||
Hi Alive
Why don't you uplift this to V2.0 as well?
thanks!
Flags: needinfo?(alive)
Reporter | ||
Comment 34•11 years ago
|
||
This is not a 2.0 feature but pure engineering work item.
Flags: needinfo?(alive)
Comment 35•11 years ago
|
||
Hi Alive,John
I need little help from you. I am not good at unit test cases.
I was trying to write Unit test case for v2.0 for sound_manager.
I almost copied John's Unit test case file for sound_manager.
Here is the problem I am facing -
1.> Even after volumeup/down/mute/unmute the volume of the channel is not changing.
Will you please help!
thanks!
Ankit
Flags: needinfo?(im)
Flags: needinfo?(alive)
Comment 36•11 years ago
|
||
In addition to comment#35
If I have initialized the volume for a channel to 5 then even after mute/unmute it reamins 5.
If I have initialized the volume for a channel to 1 then even after volume up/down it reamins same.
Assignee | ||
Comment 37•11 years ago
|
||
Ankit93040,
Would you mind to share your code with us? Without the code, we cannot find the real problem.
Flags: needinfo?(im)
Flags: needinfo?(alive)
Comment 38•11 years ago
|
||
Hi John
I want to know one thing when we say - window.dispatchEvent(new CustomEvent('volumeup'));
Have we defined this volumeup event somewhere else in some other file? (i mean in mock/test file)
Actually what ever Unit test I uploaded :-
https://bug971554.bugzilla.mozilla.org/attachment.cgi?id=8464486
when i tested it against mozilla v2.0 sound_manager.js file there are many errors.
One of the errors it shows when I wrote this - window.dispatchEvent(new CustomEvent('mute'));
The error was "currentVolume is undefined".
I feel that mute event looks into currentVolume.
So, I wanted to know have you defined these volumeup events in some file?
thanks!
Flags: needinfo?(im)
Assignee | ||
Comment 39•11 years ago
|
||
Thanks. I will test it when I am free. Keep ni in myself to remind me.
Flags: needinfo?(im)
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(im)
Assignee | ||
Comment 40•11 years ago
|
||
Ankit,
I had checked your test case. The main difference between us is that:
* I create my local-owned sound manager and testing with it. And you are trying to use the window.soundManager. It depends on the l10n.once or l10n.ready. The main reason your version won't work is that l10n is loaded after the "sound_manager".
The suggestion to fix it is that you may move the require('sound_manager.js') into the first suiteSetup(). After that you may need to change the suiteSetup() to suiteSetup(done) and require('.../sound_manager.js', done);
Flags: needinfo?(im)
You need to log in
before you can comment on or make changes to this bug.
Description
•