forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ios] Compiles ChromeTestCase under EG2.
BUG=922813 Change-Id: Ie9545589a8f99ff3ef7652ce06d3ab117fe2499e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1628049 Reviewed-by: Eugene But <eugenebut@chromium.org> Commit-Queue: Rohit Rao <rohitrao@chromium.org> Cr-Commit-Position: refs/heads/master@{#663131}
- Loading branch information
Rohit Rao
authored and
Commit Bot
committed
May 24, 2019
1 parent
e61302d
commit ee8d0c6
Showing
4 changed files
with
119 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
ios/chrome/test/earl_grey/chrome_test_case_app_interface.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2019 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef IOS_CHROME_TEST_EARL_GREY_CHROME_TEST_CASE_APP_INTERFACE_H_ | ||
#define IOS_CHROME_TEST_EARL_GREY_CHROME_TEST_CASE_APP_INTERFACE_H_ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface ChromeTestCaseAppInterface : NSObject | ||
|
||
// Sets up mock authentication and the mock account reconcilor. | ||
+ (void)setUpMockAuthentication; | ||
|
||
// Tears down mock authentication and the mock account reconcilor. | ||
+ (void)tearDownMockAuthentication; | ||
|
||
// Resets mock authentication and signin promo settings. | ||
+ (void)resetAuthentication; | ||
|
||
// Removes all infobars and clears any presented state. | ||
+ (void)removeInfoBarsAndPresentedState; | ||
|
||
@end | ||
|
||
#endif // IOS_CHROME_TEST_EARL_GREY_CHROME_TEST_CASE_APP_INTERFACE_H_ |
36 changes: 36 additions & 0 deletions
36
ios/chrome/test/earl_grey/chrome_test_case_app_interface.mm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright 2019 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#import "ios/chrome/test/earl_grey/chrome_test_case_app_interface.h" | ||
|
||
#import "ios/chrome/test/app/chrome_test_util.h" | ||
#include "ios/chrome/test/app/signin_test_util.h" | ||
|
||
#if !defined(__has_feature) || !__has_feature(objc_arc) | ||
#error "This file requires ARC support." | ||
#endif | ||
|
||
@implementation ChromeTestCaseAppInterface | ||
|
||
+ (void)setUpMockAuthentication { | ||
chrome_test_util::SetUpMockAuthentication(); | ||
chrome_test_util::SetUpMockAccountReconcilor(); | ||
} | ||
|
||
+ (void)tearDownMockAuthentication { | ||
chrome_test_util::TearDownMockAccountReconcilor(); | ||
chrome_test_util::TearDownMockAuthentication(); | ||
} | ||
|
||
+ (void)resetAuthentication { | ||
chrome_test_util::ResetSigninPromoPreferences(); | ||
chrome_test_util::ResetMockAuthentication(); | ||
} | ||
|
||
+ (void)removeInfoBarsAndPresentedState { | ||
chrome_test_util::RemoveAllInfoBars(); | ||
chrome_test_util::ClearPresentedState(); | ||
} | ||
|
||
@end |