0

Reland "ios: Enable fast animations in EG tests."

This reverts commit 28fb25cb9b.

Reason for revert: Re-land after flake is fixed, dropping iOS13.

Original change's description:
> Revert "ios: Enable fast animations in EG tests."
>
> This reverts commit 948148a8a2.
>
> Reason for revert: Needs more flake cleanup before this can land.
>
> See:
>   builders/ci/ios-simulator-full-configs/32591/overview
>   builders/ci/ios-simulator-full-configs/32588/overview
>   builders/ci/ios-simulator-full-configs/32586/overview
>   builders/ci/ios-simulator-noncq/19313/overview
>   builders/ci/ios-simulator-noncq/19312/overview
> And in Chrome:
>   builders/ci/iphone-simulator/24051/overview
>   builders/ci/iphone-simulator/24050/overview
>   builders/ci/iphone-simulator/24049/overview
>   builders/ci/ipad-simulator/23352/overview
>   builders/ci/ipad-device/20930/overview
>
>
> Original change's description:
> > ios: Enable fast animations in EG tests.
> >
> > Adjusts the speed property of CALayer to 100 to speed up tests.
> >
> > Change-Id: Ia4aac142e0f4b62b784ae59380960bfdb735c21b
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3056790
> > Commit-Queue: Justin Cohen <justincohen@chromium.org>
> > Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
> > Reviewed-by: Rohit Rao <rohitrao@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#906525}
>
> Change-Id: Ie90c2c445cd35699faed94e90bbe3095ae174694
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3056995
> Auto-Submit: Justin Cohen <justincohen@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
> Owners-Override: Mohamed Amir Yosef <mamir@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#906696}

Change-Id: Iee5d992d9f642bb2cf36b27668fca103469b5504
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3060579
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Owners-Override: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#908180}
This commit is contained in:
Justin Cohen
2021-08-03 23:02:16 +00:00
committed by Chromium LUCI CQ
parent 5d8583f840
commit f7a4e9edb1
3 changed files with 15 additions and 0 deletions

@ -11,6 +11,7 @@
#import "base/ios/crb_protocol_observers.h"
#include "base/strings/sys_string_conversions.h"
#import "ios/testing/earl_grey/app_launch_manager_app_interface.h"
#import "ios/testing/earl_grey/base_earl_grey_test_case_app_interface.h"
#import "ios/testing/earl_grey/coverage_utils.h"
#import "ios/testing/earl_grey/earl_grey_test.h"
#import "ios/third_party/edo/src/Service/Sources/EDOServiceException.h"
@ -227,6 +228,9 @@ bool LaunchArgumentsAreEqual(NSArray<NSString*>* args1,
[self ensureAppLaunchedWithArgs:arguments
relaunchPolicy:configuration.relaunch_policy];
if (@available(iOS 14, *))
[BaseEarlGreyTestCaseAppInterface enableFastAnimation];
}
- (void)ensureAppLaunchedWithFeaturesEnabled:

@ -15,6 +15,9 @@
// Logs |message| from the app process (as opposed to the test process).
+ (void)logMessage:(NSString*)message;
// Adjusts the speed property of CALayer to 100 to speed up XCUITests.
+ (void)enableFastAnimation;
@end
#endif // IOS_TESTING_EARL_GREY_BASE_EARL_GREY_TEST_CASE_APP_INTERFACE_H_

@ -4,6 +4,8 @@
#import "ios/testing/earl_grey/base_earl_grey_test_case_app_interface.h"
#import <UIKit/UIKit.h>
#include "base/logging.h"
#include "base/strings/sys_string_conversions.h"
@ -17,4 +19,10 @@
DLOG(WARNING) << base::SysNSStringToUTF8(message);
}
+ (void)enableFastAnimation {
for (UIWindow* window in [UIApplication sharedApplication].windows) {
[[window layer] setSpeed:100];
}
}
@end