Commit a0c12063 authored by bsheedy's avatar bsheedy Committed by Commit Bot

Add VR browser omnibox keyboard input test

Modifies an existing test that brings up a keyboard so that it also
inputs text via the keyboard. This is to catch future occurances of
https://crbug.com/874671 where inputting text into the VR Browser's
omnibox would cause a browser crash.

Also installs the latest VR Keyboard APK as part of pre-test setup
in test suites that could potentially use the keyboard.

Bug: 874671, 874696
Change-Id: Ic04d678e14de918fbf159078422c9d5459e8d98d
Reviewed-on: https://chromium-review.googlesource.com/1176876Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Reviewed-by: default avatarBen Pastene <bpastene@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585321}
parent c591a584
......@@ -289,15 +289,37 @@ public class VrBrowserDialogTest {
mVrBrowserTestFramework.assertNoJavaScriptErrors();
}
/**
* Tests that the keyboard appears when clicking on the URL bar.
* Also contains a regression test for https://crbug.com/874671 where inputting text into the
* URL bar would cause a browser crash.
*/
@Test
@LargeTest
@HeadTrackingMode(HeadTrackingMode.SupportedMode.FROZEN)
public void testKeyboardAppearsOnUrlBarClick() throws InterruptedException, TimeoutException {
clickElement("test_navigation_2d_page", UserFriendlyElementName.URL);
captureScreen("KeyboardAppearsOnUrlBarClick_Visible");
// Regression test for https://crbug.com/874671
// We need to use the VrCore-side emulated controller because the keyboard isn't a UI
// element, meaning we can't specify it as a click target for the Chrome-side controller.
// We also can't use the MockBrowserKeyboardInterface like we do for web input testing, as
// that does not seem to work with the omnibox.
NativeUiUtils.revertToRealController();
// Point at the keyboard and click an arbitrary key
EmulatedVrController controller = new EmulatedVrController(mVrTestRule.getActivity());
controller.recenterView();
controller.moveControllerInstant(0.0f, -0.259f, -0.996f, -0.0f);
// Spam clicks to ensure we're getting one in.
for (int i = 0; i < 5; i++) {
controller.performControllerClick();
}
mVrBrowserTestFramework.assertNoJavaScriptErrors();
}
/**
* Tests that the overflow menu appears when the overflow menu button is clicked.
*/
@Test
@LargeTest
@HeadTrackingMode(HeadTrackingMode.SupportedMode.FROZEN)
......@@ -307,6 +329,9 @@ public class VrBrowserDialogTest {
mVrBrowserTestFramework.assertNoJavaScriptErrors();
}
/**
* Tests that the page info popup appears when the security token in the URL bar is clicked.
*/
@Test
@LargeTest
@HeadTrackingMode(HeadTrackingMode.SupportedMode.FROZEN)
......
......@@ -17103,6 +17103,7 @@
"args": [
"--shared-prefs-file=//chrome/android/shared_preference_files/test/vr_ddview_skipdon_setupcomplete.json",
"--replace-system-package=com.google.vr.vrcore,//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk",
"--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk",
"--gs-results-bucket=chromium-result-details",
"--recover-devices"
],
......@@ -17141,6 +17142,7 @@
"args": [
"--shared-prefs-file=//chrome/android/shared_preference_files/test/vr_enable_vr_settings_service.json",
"--replace-system-package=com.google.vr.vrcore,//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk",
"--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk",
"--annotation=Restriction=VR_Settings_Service",
"--vr-settings-service-enabled",
"--gs-results-bucket=chromium-result-details",
......@@ -17276,6 +17278,7 @@
"args": [
"--shared-prefs-file=//chrome/android/shared_preference_files/test/vr_ddview_skipdon_setupcomplete.json",
"--replace-system-package=com.google.vr.vrcore,//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk",
"--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk",
"--gs-results-bucket=chromium-result-details",
"--recover-devices"
],
......@@ -17322,6 +17325,7 @@
"args": [
"--shared-prefs-file=//chrome/android/shared_preference_files/test/vr_enable_vr_settings_service.json",
"--replace-system-package=com.google.vr.vrcore,//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk",
"--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk",
"--annotation=Restriction=VR_Settings_Service",
"--vr-settings-service-enabled",
"--gs-results-bucket=chromium-result-details",
......
......@@ -48,6 +48,7 @@
"args": [
"--shared-prefs-file=//chrome/android/shared_preference_files/test/vr_ddview_skipdon_setupcomplete.json",
"--replace-system-package=com.google.vr.vrcore,//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk",
"--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk",
"--gs-results-bucket=chromium-result-details",
"--recover-devices"
],
......@@ -84,6 +85,7 @@
"args": [
"--shared-prefs-file=//chrome/android/shared_preference_files/test/vr_enable_vr_settings_service.json",
"--replace-system-package=com.google.vr.vrcore,//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk",
"--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk",
"--annotation=Restriction=VR_Settings_Service",
"--vr-settings-service-enabled",
"--gs-results-bucket=chromium-result-details",
......@@ -296,6 +298,7 @@
"args": [
"--shared-prefs-file=src/chrome/android/shared_preference_files/test/vr_ddview_skipdon_setupcomplete.json",
"--additional-apk=src/third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk",
"--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk",
"--additional-apk=src/third_party/gvr-android-sdk/test-apks/daydream_home/daydream_home_current.apk"
],
"name": "chrome_public_test_vr_apk (daydream)",
......@@ -305,6 +308,7 @@
"args": [
"--shared-prefs-file=//chrome/android/shared_preference_files/test/vr_ddview_skipdon_setupcomplete_o2.json",
"--additional-apk=src/third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk",
"--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk",
"--additional-apk=src/third_party/gvr-android-sdk/test-apks/daydream_home/daydream_home_current.apk"
],
"name": "chrome_public_test_vr_apk (daydream, O2)",
......@@ -314,6 +318,7 @@
"args": [
"--shared-prefs-file=src/chrome/android/shared_preference_files/test/vr_enable_vr_settings_service.json",
"--additional-apk=src/third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk",
"--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk",
"--additional-apk=src/third_party/gvr-android-sdk/test-apks/daydream_home/daydream_home_current.apk",
"--annotation=Restriction=VR_Settings_Service",
"--vr-settings-service-enabled"
......
......@@ -106,6 +106,7 @@
'args': [
'--shared-prefs-file=//chrome/android/shared_preference_files/test/vr_ddview_skipdon_setupcomplete.json',
'--replace-system-package=com.google.vr.vrcore,//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk',
'--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk',
],
'swarming': {
'dimension_sets': [
......@@ -122,6 +123,7 @@
'args': [
'--shared-prefs-file=//chrome/android/shared_preference_files/test/vr_enable_vr_settings_service.json',
'--replace-system-package=com.google.vr.vrcore,//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk',
'--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk',
'--annotation=Restriction=VR_Settings_Service',
'--vr-settings-service-enabled',
],
......@@ -177,6 +179,7 @@
'args': [
'--shared-prefs-file=src/chrome/android/shared_preference_files/test/vr_ddview_skipdon_setupcomplete.json',
'--additional-apk=src/third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk',
'--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk',
'--additional-apk=src/third_party/gvr-android-sdk/test-apks/daydream_home/daydream_home_current.apk',
],
'test': 'chrome_public_test_vr_apk',
......@@ -185,6 +188,7 @@
'args': [
'--shared-prefs-file=//chrome/android/shared_preference_files/test/vr_ddview_skipdon_setupcomplete_o2.json',
'--additional-apk=src/third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk',
'--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk',
'--additional-apk=src/third_party/gvr-android-sdk/test-apks/daydream_home/daydream_home_current.apk',
],
'test': 'chrome_public_test_vr_apk',
......@@ -193,6 +197,7 @@
'args': [
'--shared-prefs-file=src/chrome/android/shared_preference_files/test/vr_enable_vr_settings_service.json',
'--additional-apk=src/third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk',
'--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk',
'--additional-apk=src/third_party/gvr-android-sdk/test-apks/daydream_home/daydream_home_current.apk',
'--annotation=Restriction=VR_Settings_Service',
'--vr-settings-service-enabled',
......@@ -220,7 +225,8 @@
'chrome_public_test_vr_apk-ddready-ddview': {
'args': [
'--shared-prefs-file=//chrome/android/shared_preference_files/test/vr_ddview_skipdon_setupcomplete.json',
'--replace-system-package=com.google.vr.vrcore,//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk'
'--replace-system-package=com.google.vr.vrcore,//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk',
'--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk',
],
'test': 'chrome_public_test_vr_apk',
},
......@@ -228,6 +234,7 @@
'args': [
'--shared-prefs-file=//chrome/android/shared_preference_files/test/vr_enable_vr_settings_service.json',
'--replace-system-package=com.google.vr.vrcore,//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk',
'--additional-apk=//third_party/gvr-android-sdk/test-apks/vr_keyboard/vr_keyboard_current.apk',
'--annotation=Restriction=VR_Settings_Service',
'--vr-settings-service-enabled',
],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment