blob: 0d8f4051968b3c3e836f1bdc5af5d295f2d1c0cf [file] [log] [blame]
# Copyright 2018 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("//build/config/ios/ios_sdk.gni")
import("//build/config/ios/rules.gni")
config("config") {
include_dirs = [ "//ios/third_party/earl_grey2/src" ]
}
group("earl_grey2") {
testonly = true
deps = [
":app_framework",
":common_lib",
":test_lib",
":ui_lib",
]
}
source_set("common_lib") {
testonly = true
visibility = [ ":*" ]
sources = [
"src/CommonLib/Additions/NSObject+GREYCommon.h",
"src/CommonLib/Additions/NSObject+GREYCommon.m",
"src/CommonLib/Additions/NSString+GREYCommon.h",
"src/CommonLib/Additions/NSString+GREYCommon.m",
"src/CommonLib/Additions/UIView+GREYCommon.h",
"src/CommonLib/Additions/UIView+GREYCommon.m",
"src/CommonLib/Config/GREYAppState.h",
"src/CommonLib/Config/GREYConfigKey.h",
"src/CommonLib/Config/GREYConfigKey.m",
"src/CommonLib/Config/GREYConfiguration+Private.h",
"src/CommonLib/Config/GREYConfiguration.h",
"src/CommonLib/Config/GREYConfiguration.m",
"src/CommonLib/DistantObject/GREYValueType.m",
"src/CommonLib/Error/GREYError.h",
"src/CommonLib/Error/GREYError.m",
"src/CommonLib/Error/GREYErrorConstants.h",
"src/CommonLib/Error/GREYErrorConstants.m",
"src/CommonLib/Error/GREYObjectFormatter.h",
"src/CommonLib/Error/GREYObjectFormatter.m",
"src/CommonLib/Error/GREYScrollActionError.h",
"src/CommonLib/Error/GREYScrollActionError.m",
"src/CommonLib/Error/NSError+GREYCommon.h",
"src/CommonLib/Error/NSError+GREYCommon.m",
"src/CommonLib/Event/GREYTouchInfo.h",
"src/CommonLib/Event/GREYTouchInfo.m",
"src/CommonLib/Event/GREYTouchPathObject.h",
"src/CommonLib/Exceptions/GREYFailureHandler.h",
"src/CommonLib/Exceptions/GREYFrameworkException.h",
"src/CommonLib/Exceptions/GREYFrameworkException.m",
"src/CommonLib/GREYConstants.h",
"src/CommonLib/GREYConstants.m",
"src/CommonLib/GREYObjcRuntime.h",
"src/CommonLib/GREYObjcRuntime.m",
"src/CommonLib/GREYStopwatch.h",
"src/CommonLib/GREYStopwatch.m",
"src/CommonLib/GREYSwizzler.h",
"src/CommonLib/GREYSwizzler.m",
"src/CommonLib/Matcher/GREYDescription.h",
"src/CommonLib/Matcher/GREYLayoutConstraint.h",
"src/CommonLib/Matcher/GREYLayoutConstraint.m",
"src/CommonLib/Matcher/GREYStringDescription.h",
"src/CommonLib/Matcher/GREYStringDescription.m",
]
deps = [
"//ios/third_party/edo",
"//ios/third_party/fishhook",
]
public_configs = [ ":config" ]
libs = [ "UIKit.framework" ]
configs -= [
"//build/config/gcc:symbol_visibility_hidden",
"//build/config/compiler:chromium_code",
]
configs += [
"//build/config/compiler:no_chromium_code",
"//build/config/compiler:enable_arc",
"//build/config/gcc:symbol_visibility_default",
]
}
source_set("ui_lib_shared_headers") {
testonly = true
sources = [
"src/UILib/GREYElementHierarchy.h",
"src/UILib/GREYScreenshotUtil.h",
"src/UILib/GREYVisibilityChecker.h",
]
}
source_set("ui_lib") {
testonly = true
visibility = [ ":*" ]
sources = [
"src/UILib/Additions/CGGeometry+GREYUI.h",
"src/UILib/Additions/CGGeometry+GREYUI.m",
"src/UILib/Additions/NSObject+GREYUI.h",
"src/UILib/Additions/NSObject+GREYUI.m",
"src/UILib/GREYElementHierarchy.m",
"src/UILib/GREYScreenshotUtil.m",
"src/UILib/GREYVisibilityChecker+Internal.h",
"src/UILib/GREYVisibilityChecker.m",
"src/UILib/Provider/GREYDataEnumerator.h",
"src/UILib/Provider/GREYDataEnumerator.m",
"src/UILib/Provider/GREYElementProvider.h",
"src/UILib/Provider/GREYElementProvider.m",
"src/UILib/Provider/GREYUIWindowProvider.h",
"src/UILib/Provider/GREYUIWindowProvider.m",
"src/UILib/Traversal/GREYTraversal.h",
"src/UILib/Traversal/GREYTraversal.m",
"src/UILib/Traversal/GREYTraversalBFS.h",
"src/UILib/Traversal/GREYTraversalBFS.m",
"src/UILib/Traversal/GREYTraversalDFS.h",
"src/UILib/Traversal/GREYTraversalDFS.m",
]
deps = [
":common_lib",
]
public_deps = [
":ui_lib_shared_headers",
]
public_configs = [ ":config" ]
libs = [
"QuartzCore.framework",
"UIKit.framework",
]
configs -= [
"//build/config/gcc:symbol_visibility_hidden",
"//build/config/compiler:chromium_code",
]
configs += [
"//build/config/compiler:no_chromium_code",
"//build/config/compiler:enable_arc",
"//build/config/gcc:symbol_visibility_default",
]
}
source_set("app_framework_shared_headers") {
testonly = true
sources = [
"src/AppFramework/Action/GREYActions.h",
"src/AppFramework/Config/GREYAppConfiguration.h",
"src/AppFramework/Core/GREYElementInteraction.h",
"src/AppFramework/DistantObject/GREYHostApplicationDistantObject+GREYTestHelper.h",
"src/AppFramework/DistantObject/GREYHostBackgroundDistantObject+GREYApp.h",
"src/AppFramework/Error/GREYFailureScreenshotter.h",
"src/AppFramework/Event/GREYSyntheticEvents.h",
"src/AppFramework/Keyboard/GREYKeyboard.h",
"src/AppFramework/Matcher/GREYAllOf.h",
"src/AppFramework/Matcher/GREYAnyOf.h",
"src/AppFramework/Matcher/GREYMatchers.h",
"src/AppFramework/Matcher/GREYMatchersShorthand.h",
"src/AppFramework/Matcher/GREYNot.h",
"src/AppFramework/Synchronization/GREYUIThreadExecutor.h",
]
}
ios_framework_bundle("app_framework") {
testonly = true
output_name = "AppFramework"
info_plist = "Info.plist"
sources = [
"src/AppFramework/Action/GREYAction.h",
"src/AppFramework/Action/GREYActionBlock.h",
"src/AppFramework/Action/GREYActionBlock.m",
"src/AppFramework/Action/GREYActions+Internal.h",
"src/AppFramework/Action/GREYActions.m",
"src/AppFramework/Action/GREYBaseAction.h",
"src/AppFramework/Action/GREYBaseAction.m",
"src/AppFramework/Action/GREYChangeStepperAction.h",
"src/AppFramework/Action/GREYChangeStepperAction.m",
"src/AppFramework/Action/GREYMultiFingerSwipeAction.h",
"src/AppFramework/Action/GREYMultiFingerSwipeAction.m",
"src/AppFramework/Action/GREYPathGestureUtils.h",
"src/AppFramework/Action/GREYPathGestureUtils.m",
"src/AppFramework/Action/GREYPickerAction.h",
"src/AppFramework/Action/GREYPickerAction.m",
"src/AppFramework/Action/GREYPinchAction.h",
"src/AppFramework/Action/GREYPinchAction.m",
"src/AppFramework/Action/GREYScrollAction.h",
"src/AppFramework/Action/GREYScrollAction.m",
"src/AppFramework/Action/GREYScrollToContentEdgeAction.h",
"src/AppFramework/Action/GREYScrollToContentEdgeAction.m",
"src/AppFramework/Action/GREYSlideAction.h",
"src/AppFramework/Action/GREYSlideAction.m",
"src/AppFramework/Action/GREYSwipeAction.h",
"src/AppFramework/Action/GREYSwipeAction.m",
"src/AppFramework/Action/GREYTapAction.h",
"src/AppFramework/Action/GREYTapAction.m",
"src/AppFramework/Action/GREYTapper.h",
"src/AppFramework/Action/GREYTapper.m",
"src/AppFramework/Additions/CAAnimation+GREYApp.h",
"src/AppFramework/Additions/CAAnimation+GREYApp.m",
"src/AppFramework/Additions/CALayer+GREYApp.h",
"src/AppFramework/Additions/CALayer+GREYApp.m",
"src/AppFramework/Additions/NSException+GREYApp.h",
"src/AppFramework/Additions/NSException+GREYApp.m",
"src/AppFramework/Additions/NSObject+GREYApp.h",
"src/AppFramework/Additions/NSObject+GREYApp.m",
"src/AppFramework/Additions/NSRunLoop+GREYApp.h",
"src/AppFramework/Additions/NSRunLoop+GREYApp.m",
"src/AppFramework/Additions/NSTimer+GREYApp.h",
"src/AppFramework/Additions/NSTimer+GREYApp.m",
"src/AppFramework/Additions/NSURL+GREYApp.h",
"src/AppFramework/Additions/NSURL+GREYApp.m",
"src/AppFramework/Additions/NSURLConnection+GREYApp.h",
"src/AppFramework/Additions/NSURLConnection+GREYApp.m",
"src/AppFramework/Additions/NSURLSession+GREYApp.h",
"src/AppFramework/Additions/NSURLSession+GREYApp.m",
"src/AppFramework/Additions/UIAnimation+GREYApp.h",
"src/AppFramework/Additions/UIAnimation+GREYApp.m",
"src/AppFramework/Additions/UIApplication+GREYApp.h",
"src/AppFramework/Additions/UIApplication+GREYApp.m",
"src/AppFramework/Additions/UIGestureRecognizer+GREYApp.h",
"src/AppFramework/Additions/UIGestureRecognizer+GREYApp.m",
"src/AppFramework/Additions/UIScrollView+GREYApp.h",
"src/AppFramework/Additions/UIScrollView+GREYApp.m",
"src/AppFramework/Additions/UISwitch+GREYApp.h",
"src/AppFramework/Additions/UISwitch+GREYApp.m",
"src/AppFramework/Additions/UIView+GREYApp.h",
"src/AppFramework/Additions/UIView+GREYApp.m",
"src/AppFramework/Additions/UIViewController+GREYApp.h",
"src/AppFramework/Additions/UIViewController+GREYApp.m",
"src/AppFramework/Additions/UIWebView+GREYApp.h",
"src/AppFramework/Additions/UIWebView+GREYApp.m",
"src/AppFramework/Additions/UIWindow+GREYApp.h",
"src/AppFramework/Additions/UIWindow+GREYApp.m",
"src/AppFramework/Additions/__NSCFLocalDataTask_GREYApp.h",
"src/AppFramework/Additions/__NSCFLocalDataTask_GREYApp.m",
"src/AppFramework/Assertion/GREYAssertion.h",
"src/AppFramework/Assertion/GREYAssertionBlock.h",
"src/AppFramework/Assertion/GREYAssertionBlock.m",
"src/AppFramework/Assertion/GREYAssertions.h",
"src/AppFramework/Assertion/GREYAssertions.m",
"src/AppFramework/AutomationSetup/GREYAutomationSetup.h",
"src/AppFramework/AutomationSetup/GREYAutomationSetup.m",
"src/AppFramework/Config/GREYAppConfiguration.m",
"src/AppFramework/Core/GREYElementFinder.h",
"src/AppFramework/Core/GREYElementFinder.m",
"src/AppFramework/Core/GREYElementInteraction+Internal.h",
"src/AppFramework/Core/GREYElementInteraction.m",
"src/AppFramework/Core/GREYInteraction.h",
"src/AppFramework/Core/GREYInteractionDataSource.h",
"src/AppFramework/Delegate/GREYCAAnimationDelegate.h",
"src/AppFramework/Delegate/GREYCAAnimationDelegate.m",
"src/AppFramework/Delegate/GREYNSURLConnectionDelegate.h",
"src/AppFramework/Delegate/GREYNSURLConnectionDelegate.m",
"src/AppFramework/Delegate/GREYSurrogateDelegate.h",
"src/AppFramework/Delegate/GREYSurrogateDelegate.m",
"src/AppFramework/Delegate/GREYUIWebViewDelegate.h",
"src/AppFramework/Delegate/GREYUIWebViewDelegate.m",
"src/AppFramework/DistantObject/GREYHostApplicationDistantObject+GREYTestHelper.m",
"src/AppFramework/DistantObject/GREYHostApplicationDistantObject.m",
"src/AppFramework/DistantObject/GREYHostBackgroundDistantObject+GREYApp.m",
"src/AppFramework/DistantObject/GREYHostBackgroundDistantObject.m",
"src/AppFramework/DistantObject/GREYTestStub.m",
"src/AppFramework/Error/GREYAppFailureHandler.h",
"src/AppFramework/Error/GREYAppFailureHandler.m",
"src/AppFramework/Error/GREYFailureScreenshotter.m",
"src/AppFramework/Event/GREYIOHIDEventTypes.h",
"src/AppFramework/Event/GREYSyntheticEvents.m",
"src/AppFramework/Event/GREYTouchInjector.h",
"src/AppFramework/Event/GREYTouchInjector.m",
"src/AppFramework/IdlingResources/GREYDispatchQueueIdlingResource.h",
"src/AppFramework/IdlingResources/GREYDispatchQueueIdlingResource.m",
"src/AppFramework/IdlingResources/GREYIdlingResource.h",
"src/AppFramework/IdlingResources/GREYManagedObjectContextIdlingResource.h",
"src/AppFramework/IdlingResources/GREYManagedObjectContextIdlingResource.m",
"src/AppFramework/IdlingResources/GREYNSTimerIdlingResource.h",
"src/AppFramework/IdlingResources/GREYNSTimerIdlingResource.m",
"src/AppFramework/IdlingResources/GREYOperationQueueIdlingResource.h",
"src/AppFramework/IdlingResources/GREYOperationQueueIdlingResource.m",
"src/AppFramework/IdlingResources/GREYTimedIdlingResource.h",
"src/AppFramework/IdlingResources/GREYTimedIdlingResource.m",
"src/AppFramework/IdlingResources/GREYUIWebViewIdlingResource.h",
"src/AppFramework/IdlingResources/GREYUIWebViewIdlingResource.m",
"src/AppFramework/Keyboard/GREYKeyboard.m",
"src/AppFramework/Matcher/GREYAllOf.m",
"src/AppFramework/Matcher/GREYAnyOf.m",
"src/AppFramework/Matcher/GREYBaseMatcher.h",
"src/AppFramework/Matcher/GREYBaseMatcher.m",
"src/AppFramework/Matcher/GREYElementMatcherBlock.h",
"src/AppFramework/Matcher/GREYElementMatcherBlock.m",
"src/AppFramework/Matcher/GREYMatchers.m",
"src/AppFramework/Matcher/GREYMatchersShorthand.m",
"src/AppFramework/Matcher/GREYNot.m",
"src/AppFramework/Synchronization/GREYAppStateTracker.h",
"src/AppFramework/Synchronization/GREYAppStateTracker.m",
"src/AppFramework/Synchronization/GREYAppStateTrackerObject.h",
"src/AppFramework/Synchronization/GREYAppStateTrackerObject.m",
"src/AppFramework/Synchronization/GREYDispatchQueueTracker.h",
"src/AppFramework/Synchronization/GREYDispatchQueueTracker.m",
"src/AppFramework/Synchronization/GREYObjectDeallocationTracker.h",
"src/AppFramework/Synchronization/GREYObjectDeallocationTracker.m",
"src/AppFramework/Synchronization/GREYRunLoopSpinner.h",
"src/AppFramework/Synchronization/GREYRunLoopSpinner.m",
"src/AppFramework/Synchronization/GREYSyncAPI.h",
"src/AppFramework/Synchronization/GREYSyncAPI.m",
"src/AppFramework/Synchronization/GREYUIThreadExecutor+Internal.h",
"src/AppFramework/Synchronization/GREYUIThreadExecutor.m",
]
deps = [
":common_lib",
":test_lib_shared_headers",
":ui_lib",
"//build/config/ios:xctest",
"//ios/third_party/edo",
"//ios/third_party/fishhook",
]
public_deps = [
":app_framework_shared_headers",
]
public_headers = [ "src/AppFramework/EarlGreyApp/EarlGreyApp.h" ]
libs = [
"CoreData.framework",
"CoreGraphics.framework",
"Foundation.framework",
"IOKit.framework",
"QuartzCore.framework",
"WebKit.framework",
]
public_configs = [ ":config" ]
configs -= [
"//build/config/gcc:symbol_visibility_hidden",
"//build/config/compiler:chromium_code",
]
configs += [
"//build/config/compiler:no_chromium_code",
"//build/config/compiler:enable_arc",
"//build/config/gcc:symbol_visibility_default",
]
}
source_set("test_lib_shared_headers") {
testonly = true
sources = [
"src/TestLib/Config/GREYTestConfiguration.h",
"src/TestLib/DistantObject/GREYTestApplicationDistantObject+GREYLogger.h",
]
}
source_set("test_lib") {
testonly = true
sources = [
"src/AppFramework/Error/GREYFailureScreenshotterStub.m",
"src/AppFramework/Matcher/GREYMatchersShorthand.m",
"src/TestLib/Action/GREYActionsShorthand.h",
"src/TestLib/Action/GREYActionsShorthand.m",
"src/TestLib/AlertHandling/XCTestCase+GREYSystemAlertHandler.h",
"src/TestLib/AlertHandling/XCTestCase+GREYSystemAlertHandler.m",
"src/TestLib/Analytics/GREYAnalytics.h",
"src/TestLib/Analytics/GREYAnalytics.m",
"src/TestLib/Analytics/GREYAnalyticsDelegate.h",
"src/TestLib/Condition/GREYCondition.h",
"src/TestLib/Condition/GREYCondition.m",
"src/TestLib/Config/GREYTestConfiguration.m",
"src/TestLib/DistantObject/GREYHostStub.m",
"src/TestLib/DistantObject/GREYTestApplicationDistantObject+GREYLogger.m",
"src/TestLib/DistantObject/GREYTestApplicationDistantObject.m",
"src/TestLib/EarlGreyImpl/EarlGrey.h",
"src/TestLib/EarlGreyImpl/EarlGrey.m",
"src/TestLib/EarlGreyImpl/EarlGreyImpl+XCUIApplication.h",
"src/TestLib/EarlGreyImpl/EarlGreyImpl+XCUIApplication.m",
"src/TestLib/EarlGreyImpl/GREYElementInteractionProxy.h",
"src/TestLib/EarlGreyImpl/GREYElementInteractionProxy.m",
"src/TestLib/EarlGreyImpl/XCUIApplication+GREYTest.h",
"src/TestLib/EarlGreyImpl/XCUIApplication+GREYTest.m",
"src/TestLib/Exception/GREYDefaultFailureHandler.h",
"src/TestLib/Exception/GREYDefaultFailureHandler.m",
"src/TestLib/Exception/GREYFailureFormatter.h",
"src/TestLib/Exception/GREYFailureFormatter.m",
"src/TestLib/XCTestCase/GREYTestCaseInvocation.h",
"src/TestLib/XCTestCase/GREYTestCaseInvocation.m",
"src/TestLib/XCTestCase/XCTestCase+GREYTest.h",
"src/TestLib/XCTestCase/XCTestCase+GREYTest.m",
"src/TestLib/XCTestCase/XCUIApplication+GREYEnvironment.h",
"src/TestLib/XCTestCase/XCUIApplication+GREYEnvironment.m",
"src/UILib/GREYElementHierarchyStub.m",
"src/UILib/GREYScreenshotUtilStub.m",
"src/UILib/GREYVisibilityCheckerStub.m",
]
deps = [
":app_framework_shared_headers",
":common_lib",
":ui_lib_shared_headers",
"//build/config/ios:xctest",
"//ios/third_party/edo",
]
public_deps = [
":test_lib_shared_headers",
]
libs = [
"CoreData.framework",
"CoreGraphics.framework",
"Foundation.framework",
"IOKit.framework",
"QuartzCore.framework",
"UIKit.framework",
]
public_configs = [ ":config" ]
configs -= [
"//build/config/gcc:symbol_visibility_hidden",
"//build/config/compiler:chromium_code",
]
configs += [
"//build/config/compiler:no_chromium_code",
"//build/config/compiler:enable_arc",
"//build/config/gcc:symbol_visibility_default",
]
}