testNfcFiresVrdisplayactivate times out in WebappActivity |
|||||||
Issue descriptionNFC/Daydream View insertion is supposed to work in all the activity types we support, but does not currently in WebappActivity. To reproduce, change WebVrTransitionTest#testNfcFiresVrdisplayactivate's VrActivityRestriction to be either VrActivityRestriction.SupportedActivity.WAA or VrActivityRestriction.SupportedActivity.ALL, then run the test.
,
Nov 22 2017
Not out of the question. I'll take a look.
,
Nov 23 2017
It works fine on my local device, but fails on the swarmed devices.
,
Nov 23 2017
Logcat output of a failed run is available at https://isolateserver.appspot.com/browse?namespace=default-gzip&digest=d1e7278b9ffb176818028e7e3fe5ffb90d45add0&as=HT73X0204521_20171123T010253, and a post-test screenshot at https://isolateserver.appspot.com/browse?namespace=default-gzip&digest=0c73e9a6d5680d90b280a79f9e425242d20b62e7&as=screenshot.png What's interesting is that Daydream seems to think that we're already in VR: Device(HT73X0204521) 11-23 01:04:09.196 990 1638 I ActivityManager: START u0 {act=android.nfc.action.NDEF_DISCOVERED cmp=com.google.vr.vrcore/.nfc.ViewerDetectionActivity (has extras)} from uid 10108 on display 0 ... Device(HT73X0204521) 11-23 01:04:09.313 8116 8116 D LifecycleMonitor: Lifecycle status change: org.chromium.chrome.browser.webapps.WebappActivity0@2c18dbc in: PAUSED Device(HT73X0204521) 11-23 01:04:09.337 7293 7293 I ViewerDetectionActivity: Nfc debounce time is: 2000 millis. Device(HT73X0204521) 11-23 01:04:09.337 7293 7293 I ViewerDetectionActivity: Viewer scanned. ID: 3 Device(HT73X0204521) 11-23 01:04:09.340 7293 7293 I DaydreamManagerImpl: Setting viewer: Google, Inc./Daydream View Device(HT73X0204521) 11-23 01:04:09.345 7293 7293 W DaydreamManagerImpl: Already in VrMode or in Daydream session, not starting intent.
,
Nov 23 2017
Now that I think about it, it's likely that two NFC tests are being run too quickly in succession, so that the NFC scan from the second test occurs within the debounce timeout (2 seconds) of the last one.
,
Nov 27 2017
It turns out that's not the issue, at least not by itself. Adding a 2 second sleep at the end of the test to make sure we're not in the debounce timeout didn't change anything. Running the tests locally, it looks like the custom tab and webapp are getting stuck in the DOFF flow, whereas chrome tabbed activity can exit VR normally. Is this expected?
,
Nov 27 2017
That definitely doesn't sound expected... DOFF flow should work for all 3.
,
Nov 27 2017
The DOFF issue seems to have been caused by the page listening for vrdisplayactivate, but then not doing anything with it. When it actually presents using the event, everything seems to work fine. We should probably be presenting with it anyways to make sure we autopresent on NFC scan, although I'm not sure why this worked fine in CTA but not the other activity types.
,
Nov 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/676a19bd986606f320b252ccb90466f9e491fdf6 commit 676a19bd986606f320b252ccb90466f9e491fdf6 Author: bsheedy <bsheedy@chromium.org> Date: Tue Nov 28 01:09:00 2017 Fix NFC test not working in WebappActivity Fixes the issue of CCT/WAA NFC tests getting stuck in the DOFF flow. This was somehow caused by the webpage listening for vrdisplayactivate, but not actually presenting with it. Also adds a sleep at the end of the test to prevent a possible race condition with VrCore's 2 second NFC debounce timeout. Bug: 787878 Change-Id: Ic5f16258cfa94ce3fac63781c1e225b8b2749f4e Reviewed-on: https://chromium-review.googlesource.com/791938 Commit-Queue: Brian Sheedy <bsheedy@chromium.org> Reviewed-by: Michael Thiessen <mthiesse@chromium.org> Cr-Commit-Position: refs/heads/master@{#519499} [modify] https://crrev.com/676a19bd986606f320b252ccb90466f9e491fdf6/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrTransitionTest.java [modify] https://crrev.com/676a19bd986606f320b252ccb90466f9e491fdf6/chrome/test/data/android/webvr_instrumentation/html/test_nfc_fires_vrdisplayactivate.html
,
Nov 28 2017
,
Feb 7 2018
,
Mar 1 2018
,
Jul 4
,
Aug 29
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by mthiesse@chromium.org
, Nov 22 2017