New issue
Advanced search Search tips

Issue 775259 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug
Proj-XR



Sign in to add a comment

Refactor test code out of VrShellDelegate

Project Member Reported by bsheedy@chromium.org, Oct 16 2017

Issue description

The test-only code in VrShellDelegate.java should be factored out into a new test-only TestVrShellDelegate class instead of using @VisibleForTesting everywhere. This does two things:

1. Cleans up production code a bit
2. Allows us to have test-specific behavior without changing production code. This is useful for implementing temporary solutions for issues that only appear during test, such as Issue 762724.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 19 2017

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

commit dd789ac6165d4e86d8329ad71414b6efd6e324bf
Author: bsheedy <bsheedy@chromium.org>
Date: Thu Oct 19 17:41:48 2017

Add TestVrShellDelegate

This adds TestVrShellDelegate, which extends VrShellDelegate and does
two things:
1. Removes the need for @VisibleForTesting annotations in
  VrShellDelegate.
2. Allows us to have test-only code for VrShellDelegate without
  affecting production code if necessary.

Bug:  775259 
Change-Id: I1bb4beed2d88ba774a3fe28fa6799e0b8bee1113
Reviewed-on: https://chromium-review.googlesource.com/723769
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510121}
[modify] https://crrev.com/dd789ac6165d4e86d8329ad71414b6efd6e324bf/chrome/android/BUILD.gn
[modify] https://crrev.com/dd789ac6165d4e86d8329ad71414b6efd6e324bf/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
[add] https://crrev.com/dd789ac6165d4e86d8329ad71414b6efd6e324bf/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/TestVrShellDelegate.java
[modify] https://crrev.com/dd789ac6165d4e86d8329ad71414b6efd6e324bf/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrFeedbackInfoBarTest.java
[modify] https://crrev.com/dd789ac6165d4e86d8329ad71414b6efd6e324bf/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrShellNativeUiTest.java
[modify] https://crrev.com/dd789ac6165d4e86d8329ad71414b6efd6e324bf/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrShellNavigationTest.java
[modify] https://crrev.com/dd789ac6165d4e86d8329ad71414b6efd6e324bf/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrShellTransitionTest.java
[modify] https://crrev.com/dd789ac6165d4e86d8329ad71414b6efd6e324bf/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrInputTest.java
[modify] https://crrev.com/dd789ac6165d4e86d8329ad71414b6efd6e324bf/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/rules/ChromeTabbedActivityVrTestRule.java
[modify] https://crrev.com/dd789ac6165d4e86d8329ad71414b6efd6e324bf/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/rules/CustomTabActivityVrTestRule.java
[modify] https://crrev.com/dd789ac6165d4e86d8329ad71414b6efd6e324bf/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/rules/WebappActivityVrTestRule.java
[modify] https://crrev.com/dd789ac6165d4e86d8329ad71414b6efd6e324bf/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/util/VrShellDelegateUtils.java
[modify] https://crrev.com/dd789ac6165d4e86d8329ad71414b6efd6e324bf/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/util/VrTransitionUtils.java

Status: Fixed (was: Started)
Components: Internals>XR

Sign in to add a comment