New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 679827 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug
Proj-XR

Blocked on:
issue 683322

Blocking:
issue 779691
issue 670502


Participants' hotlists:
VR-Automated-Tests


Sign in to add a comment

Add tests to ensure WebVR pose and other state is only exposed to the foreground application

Project Member Reported by ddorwin@chromium.org, Jan 10 2017

Issue description

For privacy reasons, background applications must not have access to pose and other data. We should have automated tests that verify this. We should cover all platforms, including HMDs, but this is probably most important for mobile.

We may want to see whether there are similar tests for the device orientation and similar APIs that we can use as a base.
 
For context, see https://github.com/w3c/webvr/issues/173.
There's already a test to ensure that only one renderer can be presenting to a given display at a time: https://cs.chromium.org/chromium/src/device/vr/vr_display_impl_unittest.cc?sq=package:chromium&dr&l=73 

This test would likely be a derivative of that one.

Comment 3 by sko...@chromium.org, Jan 12 2017

Owner: bsheedy@chromium.org
Status: Assigned (was: Untriaged)
I think we do still need to finish the actual implementation of this. Right now we don't listen to page focus changes to know if we're actually in the foreground. We should also be sending blur/focus events when going into the back/foreground.
Components: Privacy
Blocking: 670502
mthiesse, will you please file an implementation bug?
Blockedon: 683322
Project Member

Comment 8 by bugdroid1@chromium.org, Feb 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eb52d480606f792b3f2c0ddfe0569eb67cd13bef

commit eb52d480606f792b3f2c0ddfe0569eb67cd13bef
Author: bsheedy <bsheedy@chromium.org>
Date: Thu Feb 23 19:31:25 2017

Add WebVR WebVR E2E test capabilities via Android instrumentation

This adds support for running WebVR tests that can't be done in layout
tests, such as end-to-end tests using the actual GVR implementation.

The tests consist of two parts: The WebVR code written in Javascript
and the test runner code written in Java.

The Javascript code uses the same testharness.js that layout tests use,
so all of its functionality such as asserts, EventWatcher, and
async_tests are available and work exactly like in layout tests.

The Java code is responsible for loading the initial HTML page and
performing actions that aren't possible through Javascript, such as
performing user gestures or opening new tabs. Additionally, the Java
code is what actually passes or fails the test based on the results
reported by testharness.js.

BUG= 679827 , 674974 

Review-Url: https://codereview.chromium.org/2588703003
Cr-Commit-Position: refs/heads/master@{#452586}

[modify] https://crrev.com/eb52d480606f792b3f2c0ddfe0569eb67cd13bef/chrome/android/BUILD.gn
[add] https://crrev.com/eb52d480606f792b3f2c0ddfe0569eb67cd13bef/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrTest.java
[add] https://crrev.com/eb52d480606f792b3f2c0ddfe0569eb67cd13bef/chrome/test/data/android/webvr_instrumentation/html/test_nfc_fires_onvrdisplayactivate.html
[add] https://crrev.com/eb52d480606f792b3f2c0ddfe0569eb67cd13bef/chrome/test/data/android/webvr_instrumentation/html/test_pose_data_unfocused_tab.html
[add] https://crrev.com/eb52d480606f792b3f2c0ddfe0569eb67cd13bef/chrome/test/data/android/webvr_instrumentation/html/test_requestPresent_enters_vr.html
[add] https://crrev.com/eb52d480606f792b3f2c0ddfe0569eb67cd13bef/chrome/test/data/android/webvr_instrumentation/resources/webvr_boilerplate.js
[add] https://crrev.com/eb52d480606f792b3f2c0ddfe0569eb67cd13bef/chrome/test/data/android/webvr_instrumentation/resources/webvr_e2e.css
[add] https://crrev.com/eb52d480606f792b3f2c0ddfe0569eb67cd13bef/chrome/test/data/android/webvr_instrumentation/resources/webvr_e2e.js

A test for making sure getFrameData returns false and doesn't update the pose when the tab is unfocused was added in the patch that adds the WebVR E2E functionality - is this sufficient, or are there other cases we need to test?
I'm going to go ahead and close this since testPoseDataUnfocusedTab (https://cs.chromium.org/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrTest.java?q=webvrtest.java+package:%5Echromium$&dr&l=307) should cover this AFAIK. If for whatever reason that's insufficient coverage, feel free to re-open or open a new bug.
Status: Fixed (was: Assigned)
Blocking: 779691
Components: Blink>WebXR

Sign in to add a comment