OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import <EarlGrey/EarlGrey.h> | 5 #import <EarlGrey/EarlGrey.h> |
6 #import <UIKit/UIKit.h> | 6 #import <UIKit/UIKit.h> |
7 #import <XCTest/XCTest.h> | 7 #import <XCTest/XCTest.h> |
8 | 8 |
9 #include "components/strings/grit/components_strings.h" | 9 #include "components/strings/grit/components_strings.h" |
10 #import "ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h" | 10 #import "ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h" |
11 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 11 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
12 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 12 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
13 #import "ios/testing/earl_grey/disabled_test_macros.h" | |
14 | 13 |
15 #if !defined(__has_feature) || !__has_feature(objc_arc) | 14 #if !defined(__has_feature) || !__has_feature(objc_arc) |
16 #error "This file requires ARC support." | 15 #error "This file requires ARC support." |
17 #endif | 16 #endif |
18 | 17 |
19 namespace { | 18 namespace { |
20 NSString* kTitle = @"Foo Title"; | 19 NSString* kTitle = @"Foo Title"; |
21 } // namespace | 20 } // namespace |
22 | 21 |
23 // Integration test for the alert coordinator using Earl Grey. | 22 // Integration test for the alert coordinator using Earl Grey. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 - (BOOL)isPresentingAlert { | 94 - (BOOL)isPresentingAlert { |
96 NSError* error = nil; | 95 NSError* error = nil; |
97 [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(kTitle)] | 96 [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(kTitle)] |
98 assertWithMatcher:grey_sufficientlyVisible() | 97 assertWithMatcher:grey_sufficientlyVisible() |
99 error:&error]; | 98 error:&error]; |
100 | 99 |
101 return (error == nil); | 100 return (error == nil); |
102 } | 101 } |
103 | 102 |
104 @end | 103 @end |
OLD | NEW |