Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: ios/chrome/test/earl_grey/accessibility_util.mm

Issue 2684023003: [ObjC ARC] Converts ios/chrome/test/earl_grey:test_support to ARC. (Closed)
Patch Set: Add __unsafe_unretained Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <XCTest/XCTest.h> 6 #import <XCTest/XCTest.h>
7 7
8 #include "ios/chrome/test/earl_grey/accessibility_util.h" 8 #include "ios/chrome/test/earl_grey/accessibility_util.h"
9 9
10 #if !defined(__has_feature) || !__has_feature(objc_arc)
11 #error "This file requires ARC support."
12 #endif
13
10 namespace { 14 namespace {
11 15
12 // Returns whether a UIView is hidden from the screen, based on the alpha 16 // Returns whether a UIView is hidden from the screen, based on the alpha
13 // and hidden properties of the UIView. 17 // and hidden properties of the UIView.
14 bool ViewIsHidden(UIView* view) { 18 bool ViewIsHidden(UIView* view) {
15 return view.alpha == 0 || view.hidden; 19 return view.alpha == 0 || view.hidden;
16 } 20 }
17 21
18 // Returns whether a view should be accessible. A view should be accessible if 22 // Returns whether a view should be accessible. A view should be accessible if
19 // either it is a whitelisted type or its isAccessibilityElement property is 23 // either it is a whitelisted type or its isAccessibilityElement property is
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 GREYAssert(!inaccessibleChildrenError, 348 GREYAssert(!inaccessibleChildrenError,
345 @"The accessibility tests failed: Inaccessible children error"); 349 @"The accessibility tests failed: Inaccessible children error");
346 GREYAssert(!noLabels, @"The accessibility tests failed: No labels error"); 350 GREYAssert(!noLabels, @"The accessibility tests failed: No labels error");
347 GREYAssert(!badDefaultLabel, 351 GREYAssert(!badDefaultLabel,
348 @"The accessibility tests failed: Bad default labels error"); 352 @"The accessibility tests failed: Bad default labels error");
349 GREYAssert(!tableViewError, 353 GREYAssert(!tableViewError,
350 @"The accessibility tests failed: Table view error"); 354 @"The accessibility tests failed: Table view error");
351 } 355 }
352 356
353 } // namespace chrome_test_util 357 } // namespace chrome_test_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698