Closed
Bug 1233715
Opened 9 years ago
Closed 9 years ago
tag_visibility_monitor_shared.js doesn't wait long enough for scroll events
Categories
(Firefox OS Graveyard :: Gaia::Shared, defect)
Tracking
(blocking-b2g:2.5?)
People
(Reporter: kats, Assigned: kats)
References
Details
Attachments
(1 file)
The test in tag_visibility_monitor_shared.js has a TimeForScrollAndVisibilityMonitorEvents delay which it uses to wait for scroll events to be dispatched. However, in bug 1209970 we are changing slightly how the scroll event is dispatched, so that it happens once per refresh driver tick. This is going to help avoid unnecessary relayouts and should generally make things smoother. The test in question does a bunch of scroll changes, and expects the scroll event to be dispatched immediately after each operation. With the platform changes though, we'll batch up the operations and fire the scroll event less frequently. This results in a test failure.
To fix the test, we need to either:
(a) Increase TimeForScrollAndVisibilityMonitorEvents to something > 16ms
(b) Listen for scroll events instead of having a fixed timeout
(c) Maybe do something like a rAF instead
I've tested (a) and (b) and they both work, I haven't tested (c) but if that's the preferred option I can do that instead.
Assignee | ||
Comment 1•9 years ago
|
||
Kevin, any thoughts on which of the above approaches is preferred? Feel free to redirect the needinfo - picking you since you were the last one to touch the file, even though it was just moving stuff around.
Flags: needinfo?(kevin+bugzilla)
Assignee | ||
Comment 2•9 years ago
|
||
Actually the rAF approach takes too long, it causes the test time to exceed 10s. I'll make a pull request for (b) which seems the cleanest.
Comment 3•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(kevin+bugzilla)
Attachment #8700022 -
Flags: review?(kevin+bugzilla)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bugmail.mozilla
Comment 4•9 years ago
|
||
Comment on attachment 8700022 [details] [review]
[gaia] staktrace:scrolltick > mozilla-b2g:master
This is probably something that David should probably review, but since this is only a test change, I'm fine leaving a R+ here to get you unblocked. I do think it would be good to have David audit this though, either before or after landing. Thanks!
Attachment #8700022 -
Flags: review?(kevin+bugzilla)
Attachment #8700022 -
Flags: review+
Attachment #8700022 -
Flags: feedback?(dflanagan)
Comment 6•9 years ago
|
||
https://github.com/mozilla-b2g/gaia/pull/33621
The pull request could not be applied to the integration branch. Please try again after current integration is complete. You may need to rebase your branch against the target branch.
Comment 7•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 8•9 years ago
|
||
Comment on attachment 8700022 [details] [review]
[gaia] staktrace:scrolltick > mozilla-b2g:master
Thanks for bringing this to my attention, Kevin. Looks okay to me.
I wrote the original visibility_monitor.js code, but it is no longer in use the current tag_visiblity_monitor.js was written by an intern who is long gone, and it is only used in the contacts app. (And I'd guess that it will eventually be replaced by gaia-fast-list or something similar). Anyway, my point is that I don't know much about this.
Attachment #8700022 -
Flags: feedback?(dflanagan) → feedback+
Comment 9•9 years ago
|
||
Keywords: checkin-needed
Target Milestone: --- → 2.6 S4 - 1/1
Comment 10•9 years ago
|
||
[Blocking Requested - why for this release]:
v2.5 will also need this patch to fix unit test failure.
blocking-b2g: --- → 2.5?
Flags: needinfo?(cbook)
Comment 11•9 years ago
|
||
@ Kartikaya,
Could this affect Gaia v2.5 ?
If yes, it may need to be uplifted v2.5.
Could you please take a look ?
Thank you
Flags: needinfo?(bugmail.mozilla)
Assignee | ||
Comment 12•9 years ago
|
||
The pre-existing problem with the test could affect 2.5, sure, but it should be pretty rare I think. Do you have data on how frequently this test is failing?
Flags: needinfo?(bugmail.mozilla)
Comment 13•9 years ago
|
||
mahe, josh: seems this need approval for 2.5
Flags: needinfo?(mpotharaju)
Flags: needinfo?(jocheng)
Flags: needinfo?(cbook)
Comment 14•9 years ago
|
||
Hi YiFan,
Could you help to answer comment 12 and assess whether we need this for 2.5 TV?
Flags: needinfo?(jocheng) → needinfo?(yliao)
Comment 15•9 years ago
|
||
From the test links in the merged pull requests for v2.5 ( https://github.com/mozilla-b2g/gaia/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+base%3Av2.5 ), it seems to fail in every GU19 test.
Flags: needinfo?(yliao)
Assignee | ||
Comment 16•9 years ago
|
||
Hm, ok. I'm not convinced this patch will fix that problem but it shouldn't hurt to try. You can uplift it to 2.5 with a=test-only.
You need to log in
before you can comment on or make changes to this bug.
Description
•