| Index: chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrUtils.java
|
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrUtils.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrUtils.java
|
| index dd8399872822a720700fada6f45c501564d2aa40..0a2acef55c23d29f44e8f3393d03fb5e5cd67098 100644
|
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrUtils.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrUtils.java
|
| @@ -85,7 +85,8 @@ public class VrUtils {
|
| ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
| @Override
|
| public void run() {
|
| - vrDelegate.shutdownVr(false /* isPausing */, false /* showTransition */);
|
| + vrDelegate.shutdownVr(true /* disableVrMode */, false /* canReenter */,
|
| + true /* stayingInChrome */);
|
| }
|
| });
|
| }
|
| @@ -145,12 +146,13 @@ public class VrUtils {
|
| }
|
|
|
| /**
|
| - * Determines whether an InfoBar prompting the user to install/update VR
|
| - * Services is present.
|
| + * Determines is there is any InfoBar present in the given View hierarchy.
|
| * @param parentView The View to start the search in
|
| * @return Whether the InfoBar is present
|
| */
|
| - public static boolean isUpdateInstallInfoBarPresent(View parentView) {
|
| + public static boolean isInfoBarPresent(View parentView) {
|
| + // TODO(ymalik): This will return true if any infobar is present. Is it
|
| + // possible to determine the type of infobar present (e.g. Feedback)?
|
| // InfoBarContainer will be present regardless of whether an InfoBar
|
| // is actually there, but InfoBarLayout is only present if one is
|
| // currently showing.
|
| @@ -159,7 +161,7 @@ public class VrUtils {
|
| } else if (parentView instanceof ViewGroup) {
|
| ViewGroup group = (ViewGroup) parentView;
|
| for (int i = 0; i < group.getChildCount(); i++) {
|
| - if (isUpdateInstallInfoBarPresent(group.getChildAt(i))) return true;
|
| + if (isInfoBarPresent(group.getChildAt(i))) return true;
|
| }
|
| }
|
| return false;
|
|
|