Closed Bug 996409 Opened 10 years ago Closed 10 years ago

B2G Network: 'network-active-changed' doesn't be propagated if active becomes to null

Categories

(Firefox OS Graveyard :: RIL, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED FIXED
1.4 S6 (25apr)
tracking-b2g backlog

People

(Reporter: edgar, Assigned: edgar)

References

Details

(Whiteboard: [p=2])

Attachments

(2 files)

Right now, if |active| becomes to null (which means there is no active network established in system), there is no 'network-active-changed' propagated by NetworkManager. We should fix this, otherwise API user will unable to know the |active| was changed in this case, like [1]. And we also need this for bug 995109.

[1] http://dxr.mozilla.org/mozilla-central/source/dom/push/src/PushService.jsm#477-483
Blocks: 995109
We definitely need a test case for this. I am working on this now.
blocking-b2g: --- → backlog
Whiteboard: [p=2]
Target Milestone: --- → 1.4 S6 (25apr)
Attachment #8406612 - Flags: review?(htsai)
Attachment #8406751 - Flags: review?(htsai)
Comment on attachment 8406612 [details] [diff] [review]
Part 1: 'network-active-changed' doesn't be propagated if active becomes to null, v1

Review of attachment 8406612 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/system/gonk/NetworkManager.js
@@ +646,5 @@
>  #endif
> +    }
> +
> +    if (this.active != oldActive) {
> +      Services.obs.notifyObservers(this.active, TOPIC_ACTIVE_CHANGED, null);

Good catch!
Attachment #8406612 - Flags: review?(htsai) → review+
Comment on attachment 8406751 [details] [diff] [review]
Part 2: Marionette test for 'network-active-changed', v1

Review of attachment 8406751 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thank you!
Attachment #8406751 - Flags: review?(htsai) → review+
https://hg.mozilla.org/mozilla-central/rev/fe7d26409026
https://hg.mozilla.org/mozilla-central/rev/c48e44a0e5d1
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.