Closed
Bug 729951
Opened 10 years ago
Closed 10 years ago
WebAPI does not refresh as offline when device switches from online to offline
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox14 verified, firefox15 verified, blocking-fennec1.0 +)
VERIFIED
FIXED
Firefox 15
People
(Reporter: nhirata, Assigned: mayhemer)
References
()
Details
(Whiteboard: mwc-demo)
Attachments
(1 file)
1.24 KB,
patch
|
mfinkle
:
review+
akeybl
:
approval-mozilla-aurora+
mayhemer
:
checkin+
|
Details | Diff | Splinter Review |
1. go to http://paulrouget.com/mwc-demos/apis/ 2. turn flight mode on on the device Expected: eventually the online goes offline Actual: it stays online until you reload Note: 1. Issue is only on Maple build; Maple 2/23/2012, Samsung Galaxy SII, Galaxy Nexus, HTC Desire HD 2. Nightly 2/23/2012 refreshes the status correctly for all 3 devices
Comment 1•10 years ago
|
||
Maybe a check-in didn't make it to Maple. Check-again whenever Maple merges with M-C.
Comment 2•10 years ago
|
||
We've been merging M-C to maple regularly. This might be a problem with invalidation (e.g. dupe of bug 728983)
Comment 3•10 years ago
|
||
This still happens on a current nightly.
![]() |
Reporter | |
Comment 4•10 years ago
|
||
still occurs on 4/9/2012 nightly even with orientation switch http://paulrouget.com/mwc-demos/apis/ Samsung Galaxy S II
![]() |
Reporter | |
Updated•10 years ago
|
blocking-fennec1.0: --- → ?
Updated•10 years ago
|
blocking-fennec1.0: ? → +
Comment 5•10 years ago
|
||
Can we get some testing on whether the event is not firing or the page is just not rendering the change.
![]() |
Reporter | |
Comment 6•10 years ago
|
||
I placed on airplane mode and refreshed the page after changing the script a little to do a console.log to output the online/offline status in the if portion and placed the file locally. neither online/offline status fired. Original Script from web page: <div id="connection" class="wrapper"> <span></span> </div> <style> #connection { height: 90px; background-image: url(img/blackbg.png); text-align: center; } #connection span { height: 60px; display: inline-block; font-size: 24px; padding-left: 70px; background-repeat: no-repeat; vertical-align: middle; line-height: 60px; background-image: url(img/online.png), url(img/offline.png); } #connection span.online {background-size: 60px 60px, 0 0} #connection span.offline {background-size: 0 0, 60px 60px} </style> <script> function updateOnlineStatus(online) { if (online) { $("#connection span").className = "online"; $("#connection span").textContent = "Online"; $("#mapbutton").style.visibility = "visible"; } else { $("#connection span").className = "offline"; $("#connection span").textContent = "Offline"; $("#mapbutton").style.visibility = "hidden"; } } document.body.addEventListener("offline", function () { updateOnlineStatus(false) }, false); document.body.addEventListener("online", function () { updateOnlineStatus(true) }, false); updateOnlineStatus(navigator.onLine); </script>
Updated•10 years ago
|
Keywords: regressionwindow-wanted
Comment 8•10 years ago
|
||
With hg log + grepping for "offline" + a bit of luck, I came across bug 720320, which looked suspicious. I backed it out, and sure enough, it fixes offline/online events. Interestingly, bug 720320 landed a few weeks *after* this one was reported. Perhaps this was first caused by invalidation (bug 728983) as kats suggested, then followed by a change that actually broke the functionality (bug 720320).
Keywords: qawanted,
regressionwindow-wanted
Summary: MAPLE: WebAPI does not refresh as offline when device switches from online to offline → WebAPI does not refresh as offline when device switches from online to offline
Whiteboard: MAPLE mwc-demo → mwc-demo
![]() |
Assignee | |
Comment 9•10 years ago
|
||
Isn't there an automated test for these events? It's easy to switch to offline mode from a privileged script. -> me
Assignee: nobody → honzab.moz
Comment 10•10 years ago
|
||
Hi Honza, any ideas how to move this release blocker forward?
![]() |
Assignee | |
Comment 11•10 years ago
|
||
(In reply to JP Rosevear [:jpr] from comment #10) > Hi Honza, any ideas how to move this release blocker forward? I'll take a look by tomorrow.
![]() |
Assignee | |
Comment 12•10 years ago
|
||
Can this be reproduced also on a desktop build?
![]() |
Assignee | |
Comment 13•10 years ago
|
||
We fail to get "network.manage-offline-status" pref and thus we never call SetManageOfflineStatus(true).
![]() |
Assignee | |
Comment 14•10 years ago
|
||
The pref is defined only for Firefox app: http://mxr.mozilla.org/mozilla-central/search?string=manage-offline-status So, we can either default the value of mManageOfflineStatus to true (I'm not a big fan of that) or just add the pref to the mobile specific preferences and make it "true".
Status: NEW → ASSIGNED
![]() |
Assignee | |
Comment 15•10 years ago
|
||
Attachment #622853 -
Flags: review?(mark.finkle)
Comment 16•10 years ago
|
||
Comment on attachment 622853 [details] [diff] [review] v1 Thanks
Attachment #622853 -
Flags: review?(mark.finkle) → review+
![]() |
Assignee | |
Comment 17•10 years ago
|
||
Comment on attachment 622853 [details] [diff] [review] v1 https://hg.mozilla.org/mozilla-central/rev/62910fbc21f1
Attachment #622853 -
Flags: checkin+
![]() |
Assignee | |
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
![]() |
Assignee | |
Updated•10 years ago
|
Target Milestone: --- → Firefox 15
Comment 18•10 years ago
|
||
Comment on attachment 622853 [details] [diff] [review] v1 [Approval Request Comment] Regression caused by (bug #): bug 720320 User impact if declined: broken webapi Testing completed (on m-c, etc.): Risk to taking this patch (and alternatives if risky): pref only change. reverts to previous behavior String changes made by this patch: none
Attachment #622853 -
Flags: approval-mozilla-aurora?
Comment 19•10 years ago
|
||
Comment on attachment 622853 [details] [diff] [review] v1 [Triage Comment] QA has now signed off on our first beta of FN. Approving for Aurora 14.
Attachment #622853 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 20•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/8de48951c0ac
status-firefox14:
--- → fixed
status-firefox15:
--- → fixed
Comment 21•10 years ago
|
||
Verified fixed using 2012-05-17 Nightly, Aurora and 14 Beta 2
Updated•1 year ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•