New issue
Advanced search Search tips

Issue 674974 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature
Proj-XR
Proj-XR-VR

Blocked on:
issue 567947
issue 672654


Show other hotlists

Hotlists containing this issue:
VR-Automated-Tests


Sign in to add a comment

Make WebVR Layout Tests Work

Project Member Reported by bsheedy@chromium.org, Dec 16 2016

Issue description

There are several issues preventing us from running WebVR layout tests.

1. Issue 567947 Layout tests do not work on Android L+ (cannot test our current WebVR implementation via layout tests until then)
2.  Issue 653182  WebVR depends on VR Shell, which in turn is tied to ChromeTabbedActivity. Thus, WebVR doesn't work properly in ContentShell, which is used for layout tests - the API is present, but is not fully functional.

Once those issues are fixed, we should be able to get some web platform tests for WebVR written, although there's still the issue of how we'll actually test some of the API - I'm not aware of a browser-independent way to bypass user gestures so we can actually test requestPresent, which is a pretty important part of the API. Until that's sorted out, I think the best we'd be able to do is confirm that the API is present and has the correct datatypes.
 
Labels: -Type-Launch Type-Feature
Blockedon: 567947 653182
Labels: -M-57
Owner: bsheedy@chromium.org
bsheedy, we've made progress on tests since this was filed. Has the meaning of this issue changed?
Labels: VR-Test
Blockedon: -653182 672654
Note that uncoupling VR Shell from CTA isn't necessary for cross-platform support, the two issues are distinct. We just need a way to use VR on non-android platforms (or on Android without certain features) that re-implements or mocks out what we get from CTA.
Yes, the meaning of this issue has changed.

Point #1 is (I believe) currently irrelevant since all our layout tests use mocking, and so work the same on all Android versions.

Point #2 is only necessary if we want to add non-mocked layout test support for WebVR. However, as we've discussed before, we probably shouldn't be adding layout tests whose outcome is heavily dependent on hardware setup, and instead put those in browser tests or instrumentation tests.

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

Status: Assigned (was: Untriaged)
Project Member

Comment 7 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

Status: Fixed (was: Assigned)
I'm going to go ahead and finally close this. Layout tests have worked for WebVR for quite a while, and we have some E2E coverage as well, with more being added over time.

Sign in to add a comment