Commit 1185511f authored by Mike Dougherty's avatar Mike Dougherty Committed by Commit Bot

Disable QRScanner EarlGrey tests on device.

The tests were mistakenly also disabled for simulator in
crrev.com/c/1155793.

TBR=marq@chromium.org

Bug: 869176
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I794468b78f4259ed10e230074c54a5ed0552e1f4
Reviewed-on: https://chromium-review.googlesource.com/1157109
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: default avatarMike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579506}
parent 45788444
...@@ -584,10 +584,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) { ...@@ -584,10 +584,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) {
// switched off and the correct button indicating that the torch is off is shown // switched off and the correct button indicating that the torch is off is shown
// when the scanner is opened again. // when the scanner is opened again.
- (void)testTorchButtonIsResetWhenQRScannerIsReopened { - (void)testTorchButtonIsResetWhenQRScannerIsReopened {
// TODO(crbug.com/869176): Re-enable this test on iOS 10 iPad. // TODO(crbug.com/869176): Re-enable this test on iOS 10 iPad device.
#if !TARGET_IPHONE_SIMULATOR
if (!base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) { if (!base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iOS 10."); EARL_GREY_TEST_DISABLED(@"Test disabled on iOS 10 iPad device.");
} }
#endif
id cameraControllerMock = id cameraControllerMock =
[self getCameraControllerMockWithAuthorizationStatus: [self getCameraControllerMockWithAuthorizationStatus:
...@@ -622,6 +624,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) { ...@@ -622,6 +624,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) {
// Tests that the torch button is disabled when the camera reports that torch // Tests that the torch button is disabled when the camera reports that torch
// became unavailable. // became unavailable.
- (void)testTorchButtonIsDisabledWhenTorchBecomesUnavailable { - (void)testTorchButtonIsDisabledWhenTorchBecomesUnavailable {
// TODO(crbug.com/869176): Re-enable this test on iOS 10 iPad device.
#if !TARGET_IPHONE_SIMULATOR
if (!base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iOS 10 iPad device.");
}
#endif
id cameraControllerMock = id cameraControllerMock =
[self getCameraControllerMockWithAuthorizationStatus: [self getCameraControllerMockWithAuthorizationStatus:
AVAuthorizationStatusAuthorized]; AVAuthorizationStatusAuthorized];
...@@ -669,6 +677,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) { ...@@ -669,6 +677,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) {
// Tests that a UIAlertController is presented by the QRScannerViewController if // Tests that a UIAlertController is presented by the QRScannerViewController if
// the camera state changes after the QRScannerViewController is presented. // the camera state changes after the QRScannerViewController is presented.
- (void)testDialogIsDisplayedIfCameraStateChanges { - (void)testDialogIsDisplayedIfCameraStateChanges {
// TODO(crbug.com/869176): Re-enable this test on iOS 10 iPad device.
#if !TARGET_IPHONE_SIMULATOR
if (!base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iOS 10 iPad device.");
}
#endif
id cameraControllerMock = id cameraControllerMock =
[self getCameraControllerMockWithAuthorizationStatus: [self getCameraControllerMockWithAuthorizationStatus:
AVAuthorizationStatusAuthorized]; AVAuthorizationStatusAuthorized];
...@@ -732,10 +746,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) { ...@@ -732,10 +746,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) {
// Tests that an error dialog is dismissed if the camera becomes available. // Tests that an error dialog is dismissed if the camera becomes available.
- (void)testDialogDismissedIfCameraBecomesAvailable { - (void)testDialogDismissedIfCameraBecomesAvailable {
// TODO(crbug.com/869176): Re-enable this test on iOS 10 iPad. // TODO(crbug.com/869176): Re-enable this test on iOS 10 iPad device.
#if !TARGET_IPHONE_SIMULATOR
if (!base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) { if (!base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iOS 10."); EARL_GREY_TEST_DISABLED(@"Test disabled on iOS 10 iPad device.");
} }
#endif
id cameraControllerMock = id cameraControllerMock =
[self getCameraControllerMockWithAuthorizationStatus: [self getCameraControllerMockWithAuthorizationStatus:
...@@ -807,6 +823,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) { ...@@ -807,6 +823,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) {
// Test that the correct page is loaded if the scanner result is a URL. // Test that the correct page is loaded if the scanner result is a URL.
- (void)testReceivingQRScannerURLResult { - (void)testReceivingQRScannerURLResult {
// TODO(crbug.com/869176): Re-enable this test on iOS 10 iPad device.
#if !TARGET_IPHONE_SIMULATOR
if (!base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iOS 10 iPad device.");
}
#endif
[self doTestReceivingResult:_testURL.GetContent() [self doTestReceivingResult:_testURL.GetContent()
response:kTestURLResponse response:kTestURLResponse
edit:nil]; edit:nil];
...@@ -815,10 +837,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) { ...@@ -815,10 +837,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) {
// Test that the correct page is loaded if the scanner result is a URL which is // Test that the correct page is loaded if the scanner result is a URL which is
// then manually edited. // then manually edited.
- (void)testReceivingQRScannerURLResultAndEditingTheURL { - (void)testReceivingQRScannerURLResultAndEditingTheURL {
// TODO(crbug.com/869176): Re-enable this test on iOS 10 iPad. // TODO(crbug.com/869176): Re-enable this test on iOS 10 iPad device.
#if !TARGET_IPHONE_SIMULATOR
if (!base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) { if (!base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iOS 10."); EARL_GREY_TEST_DISABLED(@"Test disabled on iOS 10 iPad device.");
} }
#endif
// TODO(crbug.com/753098): Re-enable this test on iOS 11 iPad once // TODO(crbug.com/753098): Re-enable this test on iOS 11 iPad once
// grey_typeText works on iOS 11. // grey_typeText works on iOS 11.
if (base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) { if (base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) {
...@@ -839,10 +863,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) { ...@@ -839,10 +863,12 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) {
// Test that the correct page is loaded if the scanner result is a search query // Test that the correct page is loaded if the scanner result is a search query
// which is then manually edited. // which is then manually edited.
- (void)testReceivingQRScannerSearchQueryResultAndEditingTheQuery { - (void)testReceivingQRScannerSearchQueryResultAndEditingTheQuery {
// TODO(crbug.com/869176): Re-enable this test on iOS 10 iPad. // TODO(crbug.com/869176): Re-enable this test on iOS 10 iPad device.
#if !TARGET_IPHONE_SIMULATOR
if (!base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) { if (!base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iOS 10."); EARL_GREY_TEST_DISABLED(@"Test disabled on iOS 10 iPad device.");
} }
#endif
// TODO(crbug.com/753098): Re-enable this test on iOS 11 iPad once // TODO(crbug.com/753098): Re-enable this test on iOS 11 iPad once
// grey_typeText works on iOS 11. // grey_typeText works on iOS 11.
if (base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) { if (base::ios::IsRunningOnIOS11OrLater() && IsIPadIdiom()) {
......
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