├── .gitignore
├── AC_LICENSE.TXT
├── CFAgent.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── xcshareddata
│ └── xcschemes
│ ├── CFAgent-nodebug.xcscheme
│ ├── CFAgent.xcscheme
│ ├── CFAgentLib.xcscheme
│ ├── CFAgentLib_tvOS.xcscheme
│ ├── CFAgent_tvOS.xcscheme
│ ├── IntegrationApp.xcscheme
│ ├── IntegrationTests_1.xcscheme
│ ├── IntegrationTests_2.xcscheme
│ └── IntegrationTests_3.xcscheme
├── CFAgentLib
├── CFAgentLib.h
├── Categories
│ ├── NSExpression+FBFormat.h
│ ├── NSExpression+FBFormat.m
│ ├── NSString+FBVisualLength.h
│ ├── NSString+FBVisualLength.m
│ ├── NSString+FBXMLSafeString.h
│ ├── NSString+FBXMLSafeString.m
│ ├── XCAccessibilityElement+FBComparison.h
│ ├── XCAccessibilityElement+FBComparison.m
│ ├── XCElementSnapshot+FBHelpers.h
│ ├── XCElementSnapshot+FBHelpers.m
│ ├── XCElementSnapshot+FBHitPoint.h
│ ├── XCElementSnapshot+FBHitPoint.m
│ ├── XCUIApplication+FBAlert.h
│ ├── XCUIApplication+FBAlert.m
│ ├── XCUIApplication+FBFocused.h
│ ├── XCUIApplication+FBHelpers.h
│ ├── XCUIApplication+FBHelpers.m
│ ├── XCUIApplication+FBQuiescence.h
│ ├── XCUIApplication+FBQuiescence.m
│ ├── XCUIApplication+FBTouchAction.h
│ ├── XCUIApplication+FBTouchAction.m
│ ├── XCUIApplicationProcess+FBQuiescence.h
│ ├── XCUIApplicationProcess+FBQuiescence.m
│ ├── XCUICoordinate+FBFix.h
│ ├── XCUICoordinate+FBFix.m
│ ├── XCUIDevice+CFHelpers.h
│ ├── XCUIDevice+CFHelpers.m
│ ├── XCUIDevice+FBHealthCheck.h
│ ├── XCUIDevice+FBHealthCheck.m
│ ├── XCUIDevice+FBHelpers.h
│ ├── XCUIDevice+FBHelpers.m
│ ├── XCUIDevice+FBRotation.h
│ ├── XCUIDevice+FBRotation.m
│ ├── XCUIElement+FBAccessibility.h
│ ├── XCUIElement+FBAccessibility.m
│ ├── XCUIElement+FBCaching.h
│ ├── XCUIElement+FBCaching.m
│ ├── XCUIElement+FBClassChain.h
│ ├── XCUIElement+FBClassChain.m
│ ├── XCUIElement+FBFind.h
│ ├── XCUIElement+FBFind.m
│ ├── XCUIElement+FBForceTouch.h
│ ├── XCUIElement+FBForceTouch.m
│ ├── XCUIElement+FBIsVisible.h
│ ├── XCUIElement+FBIsVisible.m
│ ├── XCUIElement+FBPickerWheel.h
│ ├── XCUIElement+FBPickerWheel.m
│ ├── XCUIElement+FBScrolling.h
│ ├── XCUIElement+FBScrolling.m
│ ├── XCUIElement+FBSwiping.h
│ ├── XCUIElement+FBSwiping.m
│ ├── XCUIElement+FBTVFocuse.h
│ ├── XCUIElement+FBTVFocuse.m
│ ├── XCUIElement+FBTap.h
│ ├── XCUIElement+FBTap.m
│ ├── XCUIElement+FBTyping.h
│ ├── XCUIElement+FBTyping.m
│ ├── XCUIElement+FBUID.h
│ ├── XCUIElement+FBUID.m
│ ├── XCUIElement+FBUtilities.h
│ ├── XCUIElement+FBUtilities.m
│ ├── XCUIElement+FBWebDriverAttributes.h
│ ├── XCUIElement+FBWebDriverAttributes.m
│ ├── XCUIElementQuery+FBHelpers.h
│ └── XCUIElementQuery+FBHelpers.m
├── FBAlert.h
├── FBAlert.m
├── FBApplication.h
├── FBApplication.m
├── Info.plist
├── Routing
│ ├── FBElement.h
│ ├── FBElementCache.h
│ ├── FBElementCache.m
│ ├── FBElementUtils.h
│ ├── FBElementUtils.m
│ ├── FBExceptions.h
│ ├── FBExceptions.m
│ ├── FBSession-Private.h
│ ├── FBSession.h
│ ├── FBSession.m
│ ├── NNGServer.h
│ ├── NNGServer.m
│ ├── NNGServer2.h
│ └── NNGServer2.m
├── Utilities
│ ├── FBActiveAppDetectionPoint.h
│ ├── FBActiveAppDetectionPoint.m
│ ├── FBAlertsMonitor.h
│ ├── FBAlertsMonitor.m
│ ├── FBAppiumActionsSynthesizer.h
│ ├── FBAppiumActionsSynthesizer.m
│ ├── FBBaseActionsParser.m
│ ├── FBBaseActionsSynthesizer.h
│ ├── FBBaseActionsSynthesizer.m
│ ├── FBClassChainQueryParser.h
│ ├── FBClassChainQueryParser.m
│ ├── FBConfiguration.h
│ ├── FBConfiguration.m
│ ├── FBDebugLogDelegateDecorator.h
│ ├── FBDebugLogDelegateDecorator.m
│ ├── FBElementTypeTransformer.h
│ ├── FBElementTypeTransformer.m
│ ├── FBErrorBuilder.h
│ ├── FBErrorBuilder.m
│ ├── FBFailureProofTestCase.h
│ ├── FBFailureProofTestCase.m
│ ├── FBImageIOScaler.h
│ ├── FBImageIOScaler.m
│ ├── FBImageUtils.h
│ ├── FBImageUtils.m
│ ├── FBKeyboard.h
│ ├── FBKeyboard.m
│ ├── FBLogger.h
│ ├── FBLogger.m
│ ├── FBMacros.h
│ ├── FBMathUtils.h
│ ├── FBMathUtils.m
│ ├── FBNotificationsHelper.h
│ ├── FBNotificationsHelper.m
│ ├── FBPasteboard.h
│ ├── FBPasteboard.m
│ ├── FBPredicate.h
│ ├── FBPredicate.m
│ ├── FBProtocolHelpers.h
│ ├── FBProtocolHelpers.m
│ ├── FBRunLoopSpinner.h
│ ├── FBRunLoopSpinner.m
│ ├── FBRuntimeUtils.h
│ ├── FBRuntimeUtils.m
│ ├── FBScreen.h
│ ├── FBScreen.m
│ ├── FBScreenshot.h
│ ├── FBScreenshot.m
│ ├── FBSettings.h
│ ├── FBSettings.m
│ ├── FBTVNavigationTracker-Private.h
│ ├── FBTVNavigationTracker.h
│ ├── FBTVNavigationTracker.m
│ ├── FBUnattachedAppLauncher.h
│ ├── FBUnattachedAppLauncher.m
│ ├── FBW3CActionsHelpers.h
│ ├── FBW3CActionsHelpers.m
│ ├── FBW3CActionsSynthesizer.h
│ ├── FBW3CActionsSynthesizer.m
│ ├── FBXCAXClientProxy.h
│ ├── FBXCAXClientProxy.m
│ ├── FBXCTestCaseImplementationFailureHoldingProxy.h
│ ├── FBXCTestCaseImplementationFailureHoldingProxy.m
│ ├── FBXCTestDaemonsProxy.h
│ ├── FBXCTestDaemonsProxy.m
│ ├── FBXCodeCompatibility.h
│ ├── FBXCodeCompatibility.m
│ ├── FBXPath-Private.h
│ ├── FBXPath.h
│ ├── FBXPath.m
│ ├── NSPredicate+FBFormat.h
│ ├── NSPredicate+FBFormat.m
│ ├── XCTestPrivateSymbols.h
│ ├── XCTestPrivateSymbols.m
│ ├── XCUIApplicationProcessDelay.h
│ └── XCUIApplicationProcessDelay.m
└── Vendor
│ ├── CocoaHTTPServer
│ └── LICENSE
│ ├── RoutingHTTPServer
│ └── LICENSE
│ └── YYCache
│ ├── YYCache.h
│ ├── YYCache.m
│ ├── YYDiskCache.h
│ ├── YYDiskCache.m
│ ├── YYKVStorage.h
│ ├── YYKVStorage.m
│ ├── YYMemoryCache.h
│ └── YYMemoryCache.m
├── CFDriverAgent
├── Info.plist
└── UITestingUITests.m
├── Configurations
├── IOSSettings.xcconfig
├── IOSTestSettings.xcconfig
├── TVOSSettings.xcconfig
└── TVOSTestSettings.xcconfig
├── LICENSE
├── PATENTS
├── PrivateHeaders
├── AccessibilityUtilities
│ └── AXSettings.h
├── MobileCoreServices
│ └── LSApplicationWorkspace.h
├── TextInput
│ └── TIPreferencesController.h
├── UIKitCore
│ └── UIKeyboardImpl.h
└── XCTest
│ ├── CDStructures.h
│ ├── NSString-XCTAdditions.h
│ ├── NSValue-XCTestAdditions.h
│ ├── UIGestureRecognizer-RecordingAdditions.h
│ ├── UILongPressGestureRecognizer-RecordingAdditions.h
│ ├── UIPanGestureRecognizer-RecordingAdditions.h
│ ├── UIPinchGestureRecognizer-RecordingAdditions.h
│ ├── UISwipeGestureRecognizer-RecordingAdditions.h
│ ├── UITapGestureRecognizer-RecordingAdditions.h
│ ├── XCAXClient_iOS.h
│ ├── XCAccessibilityElement.h
│ ├── XCActivityRecord.h
│ ├── XCApplicationMonitor.h
│ ├── XCApplicationMonitor_iOS.h
│ ├── XCApplicationQuery.h
│ ├── XCDebugLogDelegate-Protocol.h
│ ├── XCDeviceEvent.h
│ ├── XCElementSnapshot-XCUIElementSnapshot.h
│ ├── XCElementSnapshot.h
│ ├── XCEventGenerator.h
│ ├── XCKeyMappingPath.h
│ ├── XCKeyboardInputSolver.h
│ ├── XCKeyboardKeyMap.h
│ ├── XCKeyboardLayout.h
│ ├── XCPointerEvent.h
│ ├── XCPointerEventPath.h
│ ├── XCSourceCodeRecording.h
│ ├── XCSourceCodeTreeNode.h
│ ├── XCSourceCodeTreeNodeEnumerator.h
│ ├── XCSymbolicationRecord.h
│ ├── XCSymbolicatorHolder.h
│ ├── XCSynthesizedEventRecord.h
│ ├── XCTAXClient-Protocol.h
│ ├── XCTAsyncActivity-Protocol.h
│ ├── XCTAsyncActivity.h
│ ├── XCTAutomationTarget-Protocol.h
│ ├── XCTDarwinNotificationExpectation.h
│ ├── XCTElementSetTransformer-Protocol.h
│ ├── XCTKVOExpectation.h
│ ├── XCTMetric.h
│ ├── XCTNSNotificationExpectation.h
│ ├── XCTNSPredicateExpectation.h
│ ├── XCTNSPredicateExpectationObject-Protocol.h
│ ├── XCTRunnerAutomationSession.h
│ ├── XCTRunnerDaemonSession.h
│ ├── XCTRunnerIDESession.h
│ ├── XCTTestRunSession.h
│ ├── XCTTestRunSessionDelegate-Protocol.h
│ ├── XCTUIApplicationMonitor-Protocol.h
│ ├── XCTWaiter.h
│ ├── XCTWaiterDelegate-Protocol.h
│ ├── XCTWaiterDelegatePrivate-Protocol.h
│ ├── XCTWaiterManagement-Protocol.h
│ ├── XCTWaiterManager.h
│ ├── XCTest.h
│ ├── XCTestCase.h
│ ├── XCTestCaseRun.h
│ ├── XCTestCaseSuite.h
│ ├── XCTestConfiguration.h
│ ├── XCTestContext.h
│ ├── XCTestContextScope.h
│ ├── XCTestDriver.h
│ ├── XCTestDriverInterface-Protocol.h
│ ├── XCTestExpectation.h
│ ├── XCTestExpectationDelegate-Protocol.h
│ ├── XCTestExpectationWaiter.h
│ ├── XCTestLog.h
│ ├── XCTestManager_IDEInterface-Protocol.h
│ ├── XCTestManager_ManagerInterface-Protocol.h
│ ├── XCTestManager_TestsInterface-Protocol.h
│ ├── XCTestMisuseObserver.h
│ ├── XCTestObservation-Protocol.h
│ ├── XCTestObservationCenter.h
│ ├── XCTestObserver.h
│ ├── XCTestProbe.h
│ ├── XCTestRun.h
│ ├── XCTestSuite.h
│ ├── XCTestSuiteRun.h
│ ├── XCTestWaiter.h
│ ├── XCUIApplication.h
│ ├── XCUIApplicationImpl.h
│ ├── XCUIApplicationProcess.h
│ ├── XCUICoordinate.h
│ ├── XCUIDevice.h
│ ├── XCUIElement.h
│ ├── XCUIElementAsynchronousHandlerWrapper.h
│ ├── XCUIElementHitPointCoordinate.h
│ ├── XCUIElementQuery.h
│ ├── XCUIHitPointResult.h
│ ├── XCUIRecorderNodeFinder.h
│ ├── XCUIRecorderNodeFinderMatch.h
│ ├── XCUIRecorderTimingMessage.h
│ ├── XCUIRecorderUtilities.h
│ ├── XCUIScreen.h
│ ├── XCUIScreenDataSource-Protocol.h
│ ├── _XCInternalTestRun.h
│ ├── _XCKVOExpectationImplementation.h
│ ├── _XCTDarwinNotificationExpectationImplementation.h
│ ├── _XCTNSNotificationExpectationImplementation.h
│ ├── _XCTNSPredicateExpectationImplementation.h
│ ├── _XCTWaiterImpl.h
│ ├── _XCTestCaseImplementation.h
│ ├── _XCTestCaseInterruptionException.h
│ ├── _XCTestExpectationImplementation.h
│ ├── _XCTestImplementation.h
│ ├── _XCTestObservationCenterImplementation.h
│ └── _XCTestSuiteImplementation.h
├── README.md
├── WebDriverAgentLib
├── WebDriverAgentTests
├── IntegrationApp
│ ├── Classes
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── FBAlertViewController.h
│ │ ├── FBAlertViewController.m
│ │ ├── FBNavigationController.h
│ │ ├── FBNavigationController.m
│ │ ├── FBScrollViewController.h
│ │ ├── FBScrollViewController.m
│ │ ├── FBTableDataSource.h
│ │ ├── FBTableDataSource.m
│ │ ├── TouchSpotView.h
│ │ ├── TouchSpotView.m
│ │ ├── TouchViewController.h
│ │ ├── TouchViewController.m
│ │ ├── TouchableView.h
│ │ ├── TouchableView.m
│ │ ├── ViewController.h
│ │ └── ViewController.m
│ ├── Info.plist
│ ├── Resources
│ │ └── Base.lproj
│ │ │ └── Main.storyboard
│ └── main.m
├── IntegrationTests
│ ├── FBAlertTests.m
│ ├── FBAppiumMultiTouchActionsIntegrationTests.m
│ ├── FBAppiumTouchActionsIntegrationTests.m
│ ├── FBAutoAlertsHandlerTests.m
│ ├── FBConfigurationTests.m
│ ├── FBElementAttributeTests.m
│ ├── FBElementScreenshotTests.m
│ ├── FBElementSwipingTests.m
│ ├── FBElementVisibilityTests.m
│ ├── FBFailureProofTestCaseTests.m
│ ├── FBForceTouchTests.m
│ ├── FBImageIOScalerTests.m
│ ├── FBIntegrationTestCase.h
│ ├── FBIntegrationTestCase.m
│ ├── FBKeyboardTests.m
│ ├── FBPasteboardTests.m
│ ├── FBPickerWheelSelectTests.m
│ ├── FBSafariAlertTests.m
│ ├── FBScreenTests.m
│ ├── FBScrollingTests.m
│ ├── FBSessionIntegrationTests.m
│ ├── FBTapTest.m
│ ├── FBTestMacros.h
│ ├── FBTypingTest.m
│ ├── FBW3CMultiTouchActionsIntegrationTests.m
│ ├── FBW3CTouchActionsIntegrationTests.m
│ ├── FBW3CTypeActionsTests.m
│ ├── FBXPathIntegrationTests.m
│ ├── Info.plist
│ ├── XCElementSnapshotHelperTests.m
│ ├── XCElementSnapshotHitPointTests.m
│ ├── XCUIApplicationHelperTests.m
│ ├── XCUIDeviceHealthCheckTests.m
│ ├── XCUIDeviceHelperTests.m
│ ├── XCUIDeviceRotationTests.m
│ ├── XCUIElementAttributesTests.m
│ ├── XCUIElementFBFindTests.m
│ └── XCUIElementHelperIntegrationTests.m
├── UnitTests
│ ├── Doubles
│ │ ├── FBApplicationDouble.h
│ │ ├── FBApplicationDouble.m
│ │ ├── XCUIElementDouble.h
│ │ └── XCUIElementDouble.m
│ ├── FBClassChainTests.m
│ ├── FBConfigurationTests.m
│ ├── FBElementCacheTests.m
│ ├── FBElementTypeTransformerTests.m
│ ├── FBElementUtilitiesTests.m
│ ├── FBErrorBuilderTests.m
│ ├── FBExceptionHandlerTests.m
│ ├── FBMathUtilsTests.m
│ ├── FBProtocolHelpersTests.m
│ ├── FBRouteTests.m
│ ├── FBRunLoopSpinnerTests.m
│ ├── FBRuntimeUtilsTests.m
│ ├── FBSDKVersionTests.m
│ ├── FBSessionTests.m
│ ├── FBXMLSafeStringTests.m
│ ├── FBXPathTests.m
│ ├── Info.plist
│ ├── NSExpressionFBFormatTests.m
│ ├── NSPredicateFBFormatTests.m
│ ├── XCUICoordinateFix.m
│ └── XCUIElementHelpersTests.m
└── UnitTests_tvOS
│ ├── Doubles
│ ├── XCUIElementDouble.h
│ └── XCUIElementDouble.m
│ ├── FBTVNavigationTrackerTests.m
│ └── Info.plist
├── lib
├── check-dependencies.js
├── constants.js
├── logger.js
├── no-session-proxy.js
├── utils.js
├── webdriveragent.js
└── xcodebuild.js
├── libnng.a
├── nng
├── compat
│ └── nanomsg
│ │ ├── bus.h
│ │ ├── inproc.h
│ │ ├── ipc.h
│ │ ├── nn.h
│ │ ├── pair.h
│ │ ├── pipeline.h
│ │ ├── pubsub.h
│ │ ├── reqrep.h
│ │ ├── survey.h
│ │ ├── tcp.h
│ │ └── ws.h
├── nng.h
├── protocol
│ ├── bus0
│ │ └── bus.h
│ ├── pair0
│ │ └── pair.h
│ ├── pair1
│ │ └── pair.h
│ ├── pipeline0
│ │ ├── pull.h
│ │ └── push.h
│ ├── pubsub0
│ │ ├── pub.h
│ │ └── sub.h
│ ├── reqrep0
│ │ ├── rep.h
│ │ └── req.h
│ └── survey0
│ │ ├── respond.h
│ │ └── survey.h
├── supplemental
│ ├── http
│ │ └── http.h
│ ├── tls
│ │ ├── engine.h
│ │ └── tls.h
│ └── util
│ │ ├── options.h
│ │ └── platform.h
└── transport
│ ├── inproc
│ └── inproc.h
│ ├── ipc
│ └── ipc.h
│ ├── tcp
│ └── tcp.h
│ ├── tls
│ └── tls.h
│ ├── ws
│ └── websocket.h
│ └── zerotier
│ └── zerotier.h
└── ujsonin
├── main.c
├── red_black_tree.c
├── red_black_tree.h
├── string-tree.c
├── string-tree.h
├── ujsonin.c
└── ujsonin.h
/.gitignore:
--------------------------------------------------------------------------------
1 | # OS X
2 | .DS_Store
3 |
4 | # Xcode
5 | #
6 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
7 |
8 | ## Build generated
9 | build/
10 | clang/
11 | DerivedData
12 |
13 | ## Various settings
14 | *.pbxuser
15 | !default.pbxuser
16 | *.mode1v3
17 | !default.mode1v3
18 | *.mode2v3
19 | !default.mode2v3
20 | *.perspectivev3
21 | !default.perspectivev3
22 | xcuserdata
23 |
24 | ## Other
25 | *.xccheckout
26 | *.moved-aside
27 | *.xcuserstate
28 | *.xcscmblueprint
29 |
30 | ## Obj-C/Swift specific
31 | *.hmap
32 | *.ipa
33 |
34 | # AppCode
35 | .idea/
36 |
37 | # Modules map recreated on each build
38 | Modules/module.modulemap
39 |
40 | # test run
41 | *.trace
42 |
43 | # node stuff
44 | node_modules
45 |
46 | # webdriveragent zip bundles
47 | bundles/
48 | webdriveragent-*.tar.gz
49 | uncompressed/
50 | prebuilt-agents/
51 | WebDriverAgentRunner-Runner.app.zip
52 | WebDriverAgentRunner-Runner.app/
--------------------------------------------------------------------------------
/CFAgent.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CFAgent.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/NSExpression+FBFormat.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface NSExpression (FBFormat)
15 |
16 | /**
17 | Method used to normalize/verify NSExpression expressions before passing them to WDA.
18 | Only expressions of NSKeyPathExpressionType are going to be verified.
19 | Allowed property names are only these declared in FBElement protocol (property names are received in runtime)
20 | and their shortcuts (without 'wd' prefix). All other property names are considered as unknown.
21 |
22 | @param input expression object received from user input
23 | @return formatted expression
24 | @throw FBUnknownPredicateKeyException in case the given property name is not declared in FBElement protocol
25 | */
26 | + (instancetype)fb_wdExpressionWithExpression:(NSExpression *)input;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/NSExpression+FBFormat.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "NSExpression+FBFormat.h"
11 | #import "FBElementUtils.h"
12 |
13 | @implementation NSExpression (FBFormat)
14 |
15 | + (instancetype)fb_wdExpressionWithExpression:(NSExpression *)input
16 | {
17 | if ([input expressionType] != NSKeyPathExpressionType) {
18 | return input;
19 | }
20 | NSString *propName = [input keyPath];
21 | NSUInteger dotPos = [propName rangeOfString:@"."].location;
22 | if (NSNotFound != dotPos) {
23 | NSString *actualPropName = [propName substringToIndex:dotPos];
24 | NSString *suffix = [propName substringFromIndex:(dotPos + 1)];
25 | return [NSExpression expressionForKeyPath:[NSString stringWithFormat:@"%@.%@", [FBElementUtils wdAttributeNameForAttributeName:actualPropName], suffix]];
26 | }
27 | return [NSExpression expressionForKeyPath:[FBElementUtils wdAttributeNameForAttributeName:propName]];
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/NSString+FBVisualLength.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface NSString (FBVisualLength)
13 |
14 | /**
15 | Helper method that returns length of string with trimmed whitespaces
16 | */
17 | - (NSUInteger)fb_visualLength;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/NSString+FBVisualLength.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "NSString+FBVisualLength.h"
11 |
12 | @implementation NSString (FBVisualLength)
13 |
14 | - (NSUInteger)fb_visualLength
15 | {
16 | return [self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]].length;
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/NSString+FBXMLSafeString.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface NSString (FBXMLSafeString)
15 |
16 | /**
17 | Method used to normalize a string before passing it to XML document
18 |
19 | @param replacement The string to be used as a replacement for invalid XML characters
20 | @return The string where all characters, which are not members of
21 | XML Character Range definition (http://www.w3.org/TR/2008/REC-xml-20081126/#charsets),
22 | are replaced
23 | */
24 | - (NSString *)fb_xmlSafeStringWithReplacement:(NSString *)replacement;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/NSString+FBXMLSafeString.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "NSString+FBXMLSafeString.h"
11 |
12 | @implementation NSString (FBXMLSafeString)
13 |
14 | - (NSString *)fb_xmlSafeStringWithReplacement:(NSString *)replacement
15 | {
16 | static NSMutableCharacterSet *invalidSet;
17 | static dispatch_once_t onceToken;
18 | dispatch_once(&onceToken, ^{
19 | // Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
20 | invalidSet = [NSMutableCharacterSet characterSetWithRange:NSMakeRange(0x9, 1)];
21 | [invalidSet addCharactersInRange:NSMakeRange(0xA, 1)];
22 | [invalidSet addCharactersInRange:NSMakeRange(0xD, 1)];
23 | [invalidSet addCharactersInRange:NSMakeRange(0x20, 0xD7FF - 0x20 + 1)];
24 | [invalidSet addCharactersInRange:NSMakeRange(0xE000, 0xFFFD - 0xE000 + 1)];
25 | [invalidSet addCharactersInRange:NSMakeRange(0x10000, 0x10FFFF - 0x10000 + 1)];
26 | [invalidSet invert];
27 | });
28 | return [[self componentsSeparatedByCharactersInSet:invalidSet] componentsJoinedByString:replacement];
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCAccessibilityElement+FBComparison.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import "XCAccessibilityElement.h"
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface XCAccessibilityElement (FBComparison)
16 |
17 | /**
18 | Compares two XCAccessibilityElement instances
19 |
20 | @param other the other element instance
21 | @return YES if both elements are equal
22 | */
23 | - (BOOL)fb_isEqualToElement:(nullable XCAccessibilityElement *)other;
24 |
25 | @end
26 |
27 | NS_ASSUME_NONNULL_END
28 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCAccessibilityElement+FBComparison.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "XCAccessibilityElement+FBComparison.h"
11 | #import "FBElementUtils.h"
12 |
13 | @implementation XCAccessibilityElement (FBComparison)
14 |
15 | - (BOOL)fb_isEqualToElement:(XCAccessibilityElement *)other
16 | {
17 | if (nil == other) {
18 | return NO;
19 | }
20 | return [[FBElementUtils uidWithAccessibilityElement:self]
21 | isEqualToString:([FBElementUtils uidWithAccessibilityElement:other] ?: @"")];
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCElementSnapshot+FBHitPoint.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface XCElementSnapshot (FBHitPoint)
15 |
16 | /**
17 | Wrapper for Apple's hitpoint, thats resolves few known issues
18 |
19 | @return Element's hitpoint if exists nil otherwise
20 | */
21 | - (nullable NSValue *)fb_hitPoint;
22 |
23 | @end
24 |
25 | NS_ASSUME_NONNULL_END
26 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCElementSnapshot+FBHitPoint.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "XCElementSnapshot+FBHitPoint.h"
11 |
12 | #import "FBLogger.h"
13 | #import "XCUIHitPointResult.h"
14 | #import "XCElementSnapshot+FBHelpers.h"
15 |
16 | @implementation XCElementSnapshot (FBHitPoint)
17 |
18 | - (NSValue *)fb_hitPoint
19 | {
20 | NSError *error;
21 | XCUIHitPointResult *result = [self hitPoint:&error];
22 | if (nil != error) {
23 | [FBLogger logFmt:@"Failed to fetch hit point for %@ - %@", self.fb_description, error.localizedDescription];
24 | return nil;
25 | }
26 | return [NSValue valueWithCGPoint:result.hitPoint];
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIApplication+FBAlert.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface XCUIApplication (FBAlert)
13 |
14 | /* The accessiblity label used for Safari app */
15 | extern NSString *const FB_SAFARI_APP_NAME;
16 |
17 | /**
18 | Retrieve the current alert element
19 |
20 | @return Alert element instance
21 | */
22 | - (XCUIElement *)fb_alertElement;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIApplication+FBFocused.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2018-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import "FBElement.h"
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface XCUIApplication (FBFocused)
16 |
17 | /**
18 | Return current focused element
19 | */
20 | - (id)fb_focusedElement;
21 |
22 | @end
23 |
24 | NS_ASSUME_NONNULL_END
25 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIApplication+FBQuiescence.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import "XCUIApplication.h"
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface XCUIApplication (FBQuiescence)
16 |
17 | /**
18 | It allows to turn on/off waiting for application quiescence, while performing queries. Defaults to YES.
19 | This value mirrors the corresponding property of the connected XCUIApplicationProcess instance.
20 | */
21 | @property (nonatomic, assign) BOOL fb_shouldWaitForQuiescence;
22 |
23 | @end
24 |
25 | NS_ASSUME_NONNULL_END
26 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIApplication+FBQuiescence.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "XCUIApplication+FBQuiescence.h"
11 |
12 | #import "XCUIApplicationImpl.h"
13 | #import "XCUIApplicationProcess.h"
14 | #import "XCUIApplicationProcess+FBQuiescence.h"
15 |
16 |
17 | @implementation XCUIApplication (FBQuiescence)
18 |
19 | - (BOOL)fb_shouldWaitForQuiescence
20 | {
21 | return [[self applicationImpl] currentProcess].fb_shouldWaitForQuiescence.boolValue;
22 | }
23 |
24 | - (void)setFb_shouldWaitForQuiescence:(BOOL)value
25 | {
26 | [[self applicationImpl] currentProcess].fb_shouldWaitForQuiescence = @(value);
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIApplicationProcess+FBQuiescence.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "XCUIApplicationProcess.h"
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | @interface XCUIApplicationProcess (FBQuiescence)
17 |
18 | /*! Defines wtether the process should perform quiescence checks. YES by default */
19 | @property (nonatomic) NSNumber* fb_shouldWaitForQuiescence;
20 |
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUICoordinate+FBFix.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #if !TARGET_OS_TV
13 | @interface XCUICoordinate (FBFix)
14 |
15 | - (CGPoint)fb_screenPoint;
16 |
17 | @end
18 | #endif
19 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIDevice+CFHelpers.h:
--------------------------------------------------------------------------------
1 | //
2 | // XCUIDevice+CFHelpers.h
3 | // Copyright © 2021 DryArk LLC. All rights reserved.
4 | // Anti-Corruption License ( AC_LICENSE.TXT )
5 | //
6 |
7 | #ifndef XCUIDevice_CFHelpers_h
8 | #define XCUIDevice_CFHelpers_h
9 |
10 | #import
11 | #import "XCPointerEventPath.h"
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface XCUIDevice (CFHelpers)
16 |
17 | @property (readonly) id accessibilityInterface;
18 |
19 | - (void)runEventPath:(XCPointerEventPath*)path;
20 |
21 | - (void)cf_tap:(CGFloat)x
22 | y:(CGFloat)y;
23 |
24 | - (void)cf_mouseDown:(CGFloat)x
25 | y:(CGFloat)y;
26 |
27 | - (void)cf_mouseUp:(CGFloat)x
28 | y:(CGFloat)y;
29 |
30 | - (void)cf_tapTime:(CGFloat)x
31 | y:(CGFloat) y
32 | time:(CGFloat) time;
33 |
34 | - (void)cf_tapFirm:(CGFloat)x
35 | y:(CGFloat) y
36 | pressure:(CGFloat) pressure;
37 |
38 | - (void)cf_swipe:(CGFloat)x1
39 | y1:(CGFloat)y1 x2:(CGFloat)x2 y2:(CGFloat)y2 delay:(CGFloat)delay;
40 |
41 | - (void)cf_keyEvent:(id) keyId
42 | modifierFlags:(unsigned long long) modifierFlags;
43 |
44 | - (BOOL)cf_iohid:(unsigned int)page
45 | usage:(unsigned int)usage
46 | type:(unsigned int)type
47 | duration:(NSTimeInterval)duration
48 | error:(NSError **)error;
49 |
50 | - (void)cf_holdHomeButtonForDuration:(CGFloat)dur;
51 |
52 | @end
53 |
54 | NS_ASSUME_NONNULL_END
55 |
56 |
57 | #endif /* XCUIDevice_CFHelpers_h */
58 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIDevice+FBHealthCheck.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 |
15 | @interface XCUIDevice (FBHealthCheck)
16 |
17 | /**
18 | Checks health of XCTest by:
19 | 1) Querying application for some elements,
20 | 2) Triggering some device events.
21 |
22 | !!! Health check might modify simulator state so it should only be called in-between testing sessions
23 |
24 | @param application application used to issue queries
25 | @return YES if the operation succeeds, otherwise NO.
26 | */
27 | - (BOOL)fb_healthCheckWithApplication:(nullable XCUIApplication *)application;
28 |
29 | @end
30 |
31 | NS_ASSUME_NONNULL_END
32 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIDevice+FBHealthCheck.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "XCUIDevice+FBHealthCheck.h"
11 |
12 | #import "XCUIDevice+FBRotation.h"
13 | #import "XCUIApplication+FBHelpers.h"
14 |
15 | @implementation XCUIDevice (FBHealthCheck)
16 |
17 | - (BOOL)fb_healthCheckWithApplication:(nullable XCUIApplication *)application
18 | {
19 | if (![self fb_elementQueryCheckWithApplication:application]) {
20 | return NO;
21 | }
22 | if (![self fb_deviceInteractionCheck]) {
23 | return NO;
24 | }
25 | return YES;
26 | }
27 |
28 | - (BOOL)fb_elementQueryCheckWithApplication:(nullable XCUIApplication *)application
29 | {
30 | if (!application) {
31 | return NO;
32 | }
33 | if (!application.label) {
34 | return NO;
35 | }
36 | if ([application descendantsMatchingType:XCUIElementTypeAny].count == 0 ) {
37 | return NO;
38 | }
39 | return YES;
40 | }
41 |
42 | - (BOOL)fb_deviceInteractionCheck
43 | {
44 | [self pressButton:XCUIDeviceButtonHome];
45 | return YES;
46 | }
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIDevice+FBRotation.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | #if !TARGET_OS_TV
16 | @interface XCUIDevice (FBRotation)
17 |
18 | /**
19 | Sets requested device interface orientation.
20 |
21 | @param orientation The interface orientation.
22 | @return YES if the operation succeeds, otherwise NO.
23 | */
24 | - (BOOL)fb_setDeviceInterfaceOrientation:(UIDeviceOrientation)orientation;
25 |
26 | /**
27 | Sets the devices orientation to the rotation passed.
28 |
29 | @param rotationObj The rotation defining the devices orientation.
30 | @return YES if the operation succeeds, otherwise NO.
31 | */
32 | - (BOOL)fb_setDeviceRotation:(NSDictionary *)rotationObj;
33 |
34 | /*! The UIDeviceOrientation to rotation mappings */
35 | @property (strong, nonatomic, readonly) NSDictionary *fb_rotationMapping;
36 |
37 | @end
38 | #endif
39 |
40 | NS_ASSUME_NONNULL_END
41 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIElement+FBAccessibility.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface XCUIElement (FBAccessibility)
16 |
17 | /*! Whether or not the element is accessible */
18 | @property (atomic, readonly) BOOL fb_isAccessibilityElement;
19 |
20 | @end
21 |
22 |
23 | @interface XCElementSnapshot (FBAccessibility)
24 |
25 | /*! Whether or not the element in snapshot is accessible */
26 | @property (atomic, readonly) BOOL fb_isAccessibilityElement;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIElement+FBAccessibility.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "XCUIElement+FBAccessibility.h"
11 |
12 | #import "FBConfiguration.h"
13 | #import "XCElementSnapshot+FBHelpers.h"
14 | #import "XCTestPrivateSymbols.h"
15 | #import "XCUIElement+FBUtilities.h"
16 |
17 | @implementation XCUIElement (FBAccessibility)
18 |
19 | - (BOOL)fb_isAccessibilityElement
20 | {
21 | return [self fb_snapshotWithAttributes:@[FB_XCAXAIsElementAttributeName]
22 | maxDepth:@1].fb_isAccessibilityElement;
23 | }
24 |
25 | @end
26 |
27 | @implementation XCElementSnapshot (FBAccessibility)
28 |
29 | - (BOOL)fb_isAccessibilityElement
30 | {
31 | NSNumber *isAccessibilityElement = self.additionalAttributes[FB_XCAXAIsElementAttribute];
32 | if (nil != isAccessibilityElement) {
33 | return isAccessibilityElement.boolValue;
34 | }
35 |
36 | return [(NSNumber *)[self fb_attributeValue:FB_XCAXAIsElementAttributeName] boolValue];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIElement+FBCaching.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface XCUIElement (FBCaching)
15 |
16 | /*! This property is set to YES if the given element has been resolved from the cache, so it is safe to use the `lastSnapshot` property */
17 | @property (nullable, nonatomic) NSNumber *fb_isResolvedFromCache;
18 |
19 | @property (nonatomic, readonly) NSString *fb_cacheId;
20 |
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIElement+FBIsVisible.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface XCUIElement (FBIsVisible)
16 |
17 | /*! Whether or not the element is visible */
18 | @property (atomic, readonly) BOOL fb_isVisible;
19 |
20 | @end
21 |
22 |
23 | @interface XCElementSnapshot (FBIsVisible)
24 |
25 | /*! Whether or not the element is visible */
26 | @property (atomic, readonly) BOOL fb_isVisible;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIElement+FBSwiping.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface XCUIElement (FBSwiping)
14 |
15 | /**
16 | * Performs swipe gesture on the element
17 | *
18 | * @param direction Swipe direction. The following values are supported: up, down, left and right
19 | * @param velocity Swipe speed in pixels per second. This parameter is only supported since Xcode 11.4
20 | * nil value means that the default velocity is going to be used.
21 | */
22 | - (void)fb_swipeWithDirection:(NSString *)direction velocity:(nullable NSNumber*)velocity;
23 |
24 | @end
25 |
26 | NS_ASSUME_NONNULL_END
27 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIElement+FBTVFocuse.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2018-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | #if TARGET_OS_TV
15 | @interface XCUIElement (FBTVFocuse)
16 |
17 | /**
18 | Sets focus
19 |
20 | @param error If there is an error, upon return contains an NSError object that describes the problem.
21 | @return YES if the operation succeeds, otherwise NO.
22 | */
23 | - (BOOL)fb_setFocusWithError:(NSError**) error;
24 |
25 | /**
26 | Select a focused element
27 |
28 | @param error If there is an error, upon return contains an NSError object that describes the problem.
29 | @return YES if the operation succeeds, otherwise NO.
30 | */
31 | - (BOOL)fb_selectWithError:(NSError**) error;
32 |
33 | @end
34 | #endif
35 |
36 | NS_ASSUME_NONNULL_END
37 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIElement+FBTap.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface XCUIElement (FBTap)
15 |
16 | /**
17 | Waits for element to become stable (not move) and performs sync tap on element
18 |
19 | @param error If there is an error, upon return contains an NSError object that describes the problem.
20 | @return YES if the operation succeeds, otherwise NO.
21 | */
22 | - (BOOL)fb_tapWithError:(NSError **)error;
23 |
24 | /**
25 | Waits for element to become stable (not move) and performs sync tap on element
26 |
27 | @param relativeCoordinate hit point coordinate relative to the current element position
28 | @param error If there is an error, upon return contains an NSError object that describes the problem.
29 | @return YES if the operation succeeds, otherwise NO.
30 | */
31 | - (BOOL)fb_tapCoordinate:(CGPoint)relativeCoordinate error:(NSError **)error;
32 |
33 | @end
34 |
35 | NS_ASSUME_NONNULL_END
36 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIElement+FBUID.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface XCUIElement (FBUID)
16 |
17 | /*! Represents unique internal element identifier, which is the same for an element and its snapshot */
18 | @property (nonatomic, nullable, readonly, copy) NSString *fb_uid;
19 |
20 | @end
21 |
22 |
23 | @interface XCElementSnapshot (FBUID)
24 |
25 | /*! Represents unique internal element identifier, which is the same for an element and its snapshot */
26 | @property (nonatomic, nullable, readonly, copy) NSString *fb_uid;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIElement+FBUID.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "XCUIElement+FBUID.h"
11 |
12 | #import "FBElementUtils.h"
13 | #import "XCUIApplication.h"
14 | #import "XCUIElement+FBUtilities.h"
15 |
16 | @implementation XCUIElement (FBUID)
17 |
18 | - (NSString *)fb_uid
19 | {
20 | return [self isKindOfClass:XCUIApplication.class]
21 | ? [FBElementUtils uidWithAccessibilityElement:[(XCUIApplication *)self accessibilityElement]]
22 | : [self fb_takeSnapshot].fb_uid;
23 | }
24 |
25 | @end
26 |
27 | @implementation XCElementSnapshot (FBUID)
28 |
29 | - (NSString *)fb_uid
30 | {
31 | return [FBElementUtils uidWithAccessibilityElement:self.accessibilityElement];
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIElement+FBWebDriverAttributes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | @interface XCUIElement (WebDriverAttributes)
17 |
18 | @end
19 |
20 |
21 | @interface XCElementSnapshot (WebDriverAttributes)
22 |
23 | @end
24 |
25 | NS_ASSUME_NONNULL_END
26 |
--------------------------------------------------------------------------------
/CFAgentLib/Categories/XCUIElementQuery+FBHelpers.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2018-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @class XCElementSnapshot;
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | @interface XCUIElementQuery (FBHelpers)
17 |
18 | /**
19 | Extracts the cached element snapshot from its query.
20 | No requests to the accessiblity framework is made.
21 | It is only safe to use this call right after element lookup query
22 | has been executed.
23 |
24 | @return Either the cached snapshot or nil
25 | */
26 | - (nullable XCElementSnapshot *)fb_cachedSnapshot;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/CFAgentLib/FBApplication.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface FBApplication : XCUIApplication
15 |
16 | /**
17 | Constructor used to get current active application
18 | */
19 | + (instancetype)fb_activeApplication;
20 |
21 | /**
22 | Constructor used to get current active application
23 |
24 | @param bundleId The bundle identifier of an app, which should be selected as active by default
25 | if it is present in the list of active applications
26 | */
27 | + (instancetype)fb_activeApplicationWithDefaultBundleId:(nullable NSString *)bundleId;
28 |
29 | /**
30 | Constructor used to get the system application (e.g. Springboard on iOS)
31 | */
32 | + (instancetype)fb_systemApplication;
33 |
34 | /**
35 | Retrieves the list of all currently active applications
36 | */
37 | + (NSArray *)fb_activeApplications;
38 |
39 | /**
40 | Switch to system app (called Springboard on iOS)
41 |
42 | @param error If there is an error, upon return contains an NSError object that describes the problem.
43 | @return YES if the operation succeeds, otherwise NO.
44 | */
45 | + (BOOL)fb_switchToSystemApplicationWithError:(NSError **)error;
46 |
47 | @end
48 |
49 | NS_ASSUME_NONNULL_END
50 |
--------------------------------------------------------------------------------
/CFAgentLib/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/CFAgentLib/Routing/FBExceptions.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBExceptions.h"
11 |
12 | NSString *const FBInvalidArgumentException = @"FBInvalidArgumentException";
13 | NSString *const FBSessionDoesNotExistException = @"FBSessionDoesNotExistException";
14 | NSString *const FBApplicationDeadlockDetectedException = @"FBApplicationDeadlockDetectedException";
15 | NSString *const FBElementAttributeUnknownException = @"FBElementAttributeUnknownException";
16 | NSString *const FBElementNotVisibleException = @"FBElementNotVisibleException";
17 | NSString *const FBTimeoutException = @"FBTimeoutException";
18 | NSString *const FBStaleElementException = @"FBStaleElementException";
19 | NSString *const FBInvalidXPathException = @"FBInvalidXPathException";
20 | NSString *const FBXPathQueryEvaluationException = @"FBXPathQueryEvaluationException";
21 | NSString *const FBClassChainQueryParseException = @"FBClassChainQueryParseException";
22 | NSString *const FBApplicationCrashedException = @"FBApplicationCrashedException";
23 |
--------------------------------------------------------------------------------
/CFAgentLib/Routing/FBSession-Private.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @class FBElementCache;
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | @interface FBSession ()
17 | @property (nonatomic, copy, readwrite) NSString *identifier;
18 | @property (nonatomic, strong, readwrite) FBElementCache *elementCache;
19 |
20 | /**
21 | Sets session as current session
22 | */
23 | + (void)markSessionActive:(FBSession *)session;
24 |
25 | @end
26 |
27 | NS_ASSUME_NONNULL_END
28 |
--------------------------------------------------------------------------------
/CFAgentLib/Routing/NNGServer.h:
--------------------------------------------------------------------------------
1 | // Copyright © 2021 DryArk LLC. All rights reserved.
2 | // Anti-Corruption License ( AC_LICENSE.TXT )
3 |
4 | #ifndef NNGServer_h
5 | #define NNGServer_h
6 |
7 | #import
8 | #include "../../nng/nng.h"
9 | #include "../../nng/protocol/pipeline0/push.h"
10 | #include "../../nng/protocol/pipeline0/pull.h"
11 | #include "../../nng/protocol/reqrep0/rep.h"
12 | #include "../../nng/protocol/reqrep0/req.h"
13 | #include "../../ujsonin/ujsonin.h"
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | @interface NngThread : NSObject
18 | -(NngThread *)init:(int)nngPort;// framePasser:(id)framePasser;
19 | -(void)dictToStr:(NSDictionary *)dict str:(NSMutableString *)str depth:(int)depth;
20 | -(void)dealloc;
21 | -(void)entry:(id)param;
22 | @property int nngPort;
23 | @property NSArray *typeMap;
24 | //@property FramePasser *framePasser;
25 | @property nng_socket replySocket;
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
30 |
31 | #endif /* NNGServer_h */
32 |
--------------------------------------------------------------------------------
/CFAgentLib/Routing/NNGServer2.h:
--------------------------------------------------------------------------------
1 | // Copyright © 2021 DryArk LLC. All rights reserved.
2 | // Anti-Corruption License ( AC_LICENSE.TXT )
3 |
4 | #ifndef NNGServer2_h
5 | #define NNGServer2_h
6 |
7 | #import
8 | #include "../../nng/nng.h"
9 | #include "../../nng/protocol/pipeline0/push.h"
10 | #include "../../nng/protocol/pipeline0/pull.h"
11 | #include "../../nng/protocol/reqrep0/rep.h"
12 | #include "../../nng/protocol/reqrep0/req.h"
13 | #include "../../ujsonin/ujsonin.h"
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | @interface NngThread2 : NSObject
18 | -(NngThread2 *)init:(int)nngPort;
19 | -(void)dealloc;
20 | -(void)entry:(id)param;
21 | @property int nngPort;
22 | @property nng_socket replySocket;
23 | @end
24 |
25 | NS_ASSUME_NONNULL_END
26 |
27 |
28 | #endif /* NNGServer2_h */
29 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBAlertsMonitor.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @class FBAlert, XCUIApplication;
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | @protocol FBAlertsMonitorDelegate
17 |
18 | /**
19 | The callback which is invoked when an unexpected on-screen alert is shown
20 |
21 | @param alert The instance of the current alert
22 | */
23 | - (void)didDetectAlert:(FBAlert *)alert;
24 |
25 | @end
26 |
27 | @interface FBAlertsMonitor : NSObject
28 |
29 | /*! The delegate which decides on what to do whwn an alert is detected */
30 | @property (nonatomic, nullable, weak) id delegate;
31 | /*! The active appication instance. It is updated by the session instance when necessary */
32 | @property (nonatomic, nullable) XCUIApplication *application;
33 |
34 | /**
35 | Creates an instance of alerts monitor.
36 | The monitoring is done on the main thread and is disabled unless `enable` is called.
37 |
38 | @return Alerts monitor instance
39 | */
40 | - (instancetype)init;
41 |
42 | /**
43 | Enables alerts monitoring
44 | */
45 | - (void)enable;
46 |
47 | /**
48 | Disables alerts monitoring
49 | */
50 | - (void)disable;
51 |
52 | @end
53 |
54 | NS_ASSUME_NONNULL_END
55 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBAppiumActionsSynthesizer.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBBaseActionsSynthesizer.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | #if !TARGET_OS_TV
15 | @interface FBAppiumActionsSynthesizer : FBBaseActionsSynthesizer
16 |
17 | @end
18 | #endif
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBBaseActionsParser.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBBaseActionsSynthesizer.h"
11 |
12 | #import "FBErrorBuilder.h"
13 |
14 | @implementation FBBaseActionsSynthesizer
15 |
16 | - (instancetype)initWithActions:(NSArray *)actions forApplication:(XCUIApplication *)application
17 | {
18 | self = [super init];
19 | if (self) {
20 | _actions = actions;
21 | _application = application;
22 | }
23 | return self;
24 | }
25 |
26 | - (nullable XCSynthesizedEventRecord *)synthesizeWithError:(NSError **)error
27 | {
28 | @throw [[FBErrorBuilder.builder withDescription:@"Override this method in subclasses"] build];
29 | return nil;
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBDebugLogDelegateDecorator.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | /**
16 | XCTestLogger decorator that will print all debug information to console
17 | */
18 | @interface FBDebugLogDelegateDecorator : NSObject
19 |
20 | /**
21 | Decorates XCTestLogger by also printing debug message to console
22 | */
23 | + (void)decorateXCTestLogger;
24 |
25 | @end
26 |
27 | NS_ASSUME_NONNULL_END
28 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBElementTypeTransformer.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | /**
16 | Class used to translate between XCUIElementType and string name
17 | */
18 | @interface FBElementTypeTransformer : NSObject
19 |
20 | /**
21 | Converts string to XCUIElementType
22 |
23 | @param typeName converted string to XCUIElementType
24 | @return Proper XCUIElementType or XCUIElementTypeAny if typeName is nil or unrecognised
25 | */
26 | + (XCUIElementType)elementTypeWithTypeName:(NSString *__nullable)typeName;
27 |
28 | /**
29 | Converts XCUIElementType to string
30 |
31 | @param type converted XCUIElementType to string
32 | @return XCUIElementType as NSString
33 | */
34 | + (NSString *)stringWithElementType:(XCUIElementType)type;
35 |
36 | /**
37 | Converts XCUIElementType to short string by striping `XCUIElementType` from it
38 |
39 | @param type converted XCUIElementType to string
40 | @return XCUIElementType as NSString with stripped `XCUIElementType`
41 | */
42 | + (NSString *)shortStringWithElementType:(XCUIElementType)type;
43 |
44 | @end
45 |
46 | NS_ASSUME_NONNULL_END
47 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBFailureProofTestCase.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /**
15 | Test Case that will never fail or stop from running in case of failure
16 | */
17 | @interface FBFailureProofTestCase : XCTestCase
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBImageUtils.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /*! Returns YES if the data contains a PNG image */
15 | BOOL FBIsPngImage(NSData *imageData);
16 |
17 | /*! Converts the given image data to a PNG representation if necessary */
18 | NSData *_Nullable FBToPngData(NSData *imageData);
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBImageUtils.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBImageUtils.h"
11 |
12 | #import "FBMacros.h"
13 | #import "FBConfiguration.h"
14 |
15 | static uint8_t PNG_MAGIC[] = { 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A };
16 | static const NSUInteger PNG_MAGIC_LEN = 8;
17 |
18 | BOOL FBIsPngImage(NSData *imageData)
19 | {
20 | if (nil == imageData || [imageData length] < PNG_MAGIC_LEN) {
21 | return NO;
22 | }
23 |
24 | static NSData* pngMagicStartData = nil;
25 | static dispatch_once_t oncePngToken;
26 | dispatch_once(&oncePngToken, ^{
27 | pngMagicStartData = [NSData dataWithBytesNoCopy:(void*)PNG_MAGIC length:PNG_MAGIC_LEN freeWhenDone:NO];
28 | });
29 |
30 | #pragma clang diagnostic push
31 | #pragma clang diagnostic ignored "-Wassign-enum"
32 | NSRange range = [imageData rangeOfData:pngMagicStartData options:kNilOptions range:NSMakeRange(0, PNG_MAGIC_LEN)];
33 | #pragma clang diagnostic pop
34 | return range.location != NSNotFound;
35 | }
36 |
37 | NSData *FBToPngData(NSData *imageData) {
38 | if (nil == imageData || [imageData length] < PNG_MAGIC_LEN) {
39 | return nil;
40 | }
41 | if (FBIsPngImage(imageData)) {
42 | return imageData;
43 | }
44 |
45 | UIImage *image = [UIImage imageWithData:imageData];
46 | return nil == image ? nil : (NSData *)UIImagePNGRepresentation(image);
47 | }
48 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBLogger.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /**
15 | A Global Logger object that understands log levels
16 | */
17 | @interface FBLogger : NSObject
18 |
19 | /**
20 | Log to stdout.
21 | */
22 | + (void)log:(NSString *)message;
23 | + (void)logFmt:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
24 |
25 | /**
26 | Log to stdout, only if WDA is Verbose
27 | */
28 | + (void)verboseLog:(NSString *)message;
29 | + (void)verboseLogFmt:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
30 |
31 | @end
32 |
33 | NS_ASSUME_NONNULL_END
34 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBLogger.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBLogger.h"
11 |
12 | #import "FBConfiguration.h"
13 |
14 | @implementation FBLogger
15 |
16 | + (void)log:(NSString *)message
17 | {
18 | NSLog(@"%@", message);
19 | }
20 |
21 | + (void)logFmt:(NSString *)format, ...
22 | {
23 | va_list args;
24 | va_start(args, format);
25 | NSLogv(format, args);
26 | va_end(args);
27 | }
28 |
29 | + (void)verboseLog:(NSString *)message
30 | {
31 | if (!FBConfiguration.verboseLoggingEnabled) {
32 | return;
33 | }
34 | [self log:message];
35 | }
36 |
37 | + (void)verboseLogFmt:(NSString *)format, ...
38 | {
39 | if (!FBConfiguration.verboseLoggingEnabled) {
40 | return;
41 | }
42 | va_list args;
43 | va_start(args, format);
44 | NSLogv(format, args);
45 | va_end(args);
46 | }
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBNotificationsHelper.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface FBNotificationsHelper : NSObject
15 |
16 | /**
17 | Creates an expectation that is fulfilled when an expected NSNotification is received
18 |
19 | @param name The name of the awaited notification
20 | @param timeout The maximum amount of float seconds to wait for the expectation
21 | @return The appropriate waiter result
22 | */
23 | + (XCTWaiterResult)waitForNotificationWithName:(NSNotificationName)name
24 | timeout:(NSTimeInterval)timeout;
25 |
26 | /**
27 | Creates an expectation that is fulfilled when an expected Darwin notification is received
28 |
29 | @param name The name of the awaited notification
30 | @param timeout The maximum amount of float seconds to wait for the expectation
31 | @return The appropriate waiter result
32 | */
33 | + (XCTWaiterResult)waitForDarwinNotificationWithName:(NSString *)name
34 | timeout:(NSTimeInterval)timeout;
35 |
36 | @end
37 |
38 | NS_ASSUME_NONNULL_END
39 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBNotificationsHelper.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBNotificationsHelper.h"
11 |
12 | @implementation FBNotificationsHelper
13 |
14 | + (XCTWaiterResult)waitForNotificationWithName:(NSNotificationName)name
15 | timeout:(NSTimeInterval)timeout
16 | {
17 | XCTNSNotificationExpectation *expectation = [[XCTNSNotificationExpectation alloc]
18 | initWithName:name];
19 | return [XCTWaiter waitForExpectations:@[expectation] timeout:timeout];
20 | }
21 |
22 | + (XCTWaiterResult)waitForDarwinNotificationWithName:(NSString *)name
23 | timeout:(NSTimeInterval)timeout
24 | {
25 | XCTDarwinNotificationExpectation *expectation = [[XCTDarwinNotificationExpectation alloc]
26 | initWithNotificationName:name];
27 | return [XCTWaiter waitForExpectations:@[expectation] timeout:timeout];
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBPasteboard.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | #if !TARGET_OS_TV
15 | @interface FBPasteboard : NSObject
16 |
17 | /**
18 | Sets data to the general pasteboard
19 |
20 | @param data base64-encoded string containing the data chunk which is going to be written to the pasteboard
21 | @param type one of the possible data types to set: plaintext, url, image
22 | @param error If there is an error, upon return contains an NSError object that describes the problem
23 | @return YES if the operation was successful
24 | */
25 | + (BOOL)setData:(NSData *)data forType:(NSString *)type error:(NSError **)error;
26 |
27 | /**
28 | Gets the data contained in the general pasteboard
29 |
30 | @param type one of the possible data types to get: plaintext, url, image
31 | @param error If there is an error, upon return contains an NSError object that describes the problem
32 | @return NSData object, containing the pasteboard content or an empty string if the pasteboard is empty.
33 | nil is returned if there was an error while getting the data from the pasteboard
34 | */
35 | + (nullable NSData *)dataForType:(NSString *)type error:(NSError **)error;
36 |
37 | @end
38 | #endif
39 |
40 | NS_ASSUME_NONNULL_END
41 |
42 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBPredicate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /**
15 | HACK!!!
16 | This is hacky predicate that will force XCTest to evaluate whole XCElementSnapshot.
17 | Of course we should aim not to use this, but it buys us some time.
18 | */
19 | @interface FBPredicate : NSPredicate
20 |
21 | + (NSPredicate *)predicateWithFormat:(NSString *)predicateFormat, ...;
22 |
23 | /*! Predicate string attached to original predicate to force resolve it in XCTest */
24 | + (NSString *)forceResolvePredicateString;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBPredicate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBPredicate.h"
11 |
12 | @implementation FBPredicate
13 |
14 | + (NSPredicate *)predicateWithFormat:(NSString *)predicateFormat, ...
15 | {
16 | va_list args;
17 | va_start(args, predicateFormat);
18 | NSPredicate *predicate = [NSPredicate predicateWithFormat:predicateFormat arguments:args];
19 | va_end(args);
20 | NSPredicate *hackPredicate = [NSPredicate predicateWithFormat:self.forceResolvePredicateString];
21 | return [NSCompoundPredicate andPredicateWithSubpredicates:@[predicate, hackPredicate]];
22 | }
23 |
24 | + (NSString *)forceResolvePredicateString
25 | {
26 | return @"1 == 1 or identifier == 0 or frame == 0 or value == 0 or title == 0 or label == 0 or elementType == 0 or enabled == 0 or placeholderValue == 0 or selected == 0";
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBProtocolHelpers.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /**
15 | Inserts element uuid into the response dictionary
16 |
17 | @param dst The target dictionary. It is NOT mutated
18 | @param element Either element identifier or element object itself
19 | @returns The changed dictionary
20 | */
21 | NSDictionary *FBInsertElement(NSDictionary *dst, id element);
22 |
23 | /**
24 | Extracts element uuid from dictionary
25 |
26 | @param src The source dictionary
27 | @returns The resulting element or nil if no element keys are found
28 | */
29 | id _Nullable FBExtractElement(NSDictionary *src);
30 |
31 | /**
32 | Cleanup items having element keys from the dictionary
33 |
34 | @param src The source dictionary
35 | @returns The resulting dictionary
36 | */
37 | NSDictionary *FBCleanupElements(NSDictionary *src);
38 |
39 | /**
40 | Parses key/value pairs of valid W3C capabilities
41 |
42 | @param caps The source capabilitites dictionary
43 | @param error Is set if there was an error while parsing the source capabilities
44 | @returns Parsed capabilitites mapping or nil in case of failure
45 | */
46 | NSDictionary *_Nullable FBParseCapabilities(NSDictionary *caps, NSError **error);
47 |
48 | NS_ASSUME_NONNULL_END
49 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBScreen.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface FBScreen : NSObject
15 |
16 | /**
17 | The scale factor of the main device's screen
18 | */
19 | + (double)scale;
20 |
21 | /**
22 | The absolute size of application's status bar or CGSizeZero if it's hidden or does not exist
23 | */
24 | + (CGSize)statusBarSizeForApplication:(XCUIApplication *)application;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBScreen.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBScreen.h"
11 | #import "FBApplication.h"
12 | #import "XCUIElement+FBIsVisible.h"
13 | #import "FBXCodeCompatibility.h"
14 | #import "XCUIScreen.h"
15 |
16 | @implementation FBScreen
17 |
18 | + (double)scale
19 | {
20 | return [XCUIScreen.mainScreen scale];
21 | }
22 |
23 | + (CGSize)statusBarSizeForApplication:(XCUIApplication *)application
24 | {
25 | XCUIApplication *app = application;
26 | BOOL expectVisibleBar = YES;
27 |
28 | // Since iOS 13 the status bar is no longer part of the application, it’s part of the SpringBoard
29 | if (@available(iOS 13.0, *)) {
30 | app = FBApplication.fb_systemApplication;
31 | expectVisibleBar = NO;
32 | }
33 |
34 | XCUIElement *mainStatusBar = app.statusBars.fb_firstMatch;
35 | if (!mainStatusBar || (expectVisibleBar && !mainStatusBar.fb_isVisible)) {
36 | return CGSizeZero;
37 | }
38 | return mainStatusBar.frame.size;
39 | }
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBTVNavigationTracker-Private.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2018-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #if TARGET_OS_TV
13 |
14 | @interface FBTVNavigationItem ()
15 | @property (nonatomic, readonly) NSString *uid;
16 | @property (nonatomic, readonly) NSMutableSet* directions;
17 |
18 | + (instancetype)itemWithUid:(NSString *) uid;
19 | @end
20 |
21 |
22 | @interface FBTVNavigationTracker ()
23 |
24 | - (FBTVDirection)horizontalDirectionWithItem:(FBTVNavigationItem *)item andDelta:(CGFloat)delta;
25 | - (FBTVDirection)verticalDirectionWithItem:(FBTVNavigationItem *)item andDelta:(CGFloat)delta;
26 | @end
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBTVNavigationTracker.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2018-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | #if TARGET_OS_TV
14 |
15 | /**
16 | Defines directions to move focuse to.
17 | */
18 | typedef NS_ENUM(NSUInteger, FBTVDirection) {
19 | FBTVDirectionUp = 0,
20 | FBTVDirectionDown = 1,
21 | FBTVDirectionLeft = 2,
22 | FBTVDirectionRight = 3,
23 | FBTVDirectionNone = 4
24 | };
25 |
26 | NS_ASSUME_NONNULL_BEGIN
27 |
28 | @interface FBTVNavigationItem : NSObject
29 | @end
30 |
31 | @interface FBTVNavigationTracker : NSObject
32 |
33 | /**
34 | Track the target element's point
35 |
36 | @param targetElement A target element which will track
37 | @return An instancce of FBTVNavigationTracker
38 | */
39 | + (instancetype)trackerWithTargetElement: (XCUIElement *) targetElement;
40 |
41 | /**
42 | Determine the correct direction to move the focus to the tracked target
43 | element from the currently focused one
44 |
45 | @return FBTVDirection to move the focus to
46 | */
47 | - (FBTVDirection)directionToFocusedElement;
48 |
49 | @end
50 |
51 | NS_ASSUME_NONNULL_END
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBUnattachedAppLauncher.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /**
15 | Launches apps without attaching them to an XCUITest or a WDA session, allowing them to remain open
16 | when WDA closes.
17 | */
18 | @interface FBUnattachedAppLauncher : NSObject
19 |
20 | /**
21 | Launch the app with the specified bundle ID. Return YES if successful, NO otherwise.
22 | */
23 | + (BOOL)launchAppWithBundleId:(NSString *)bundleId;
24 |
25 | @end
26 |
27 | NS_ASSUME_NONNULL_END
28 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBUnattachedAppLauncher.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBUnattachedAppLauncher.h"
11 | #import "LSApplicationWorkspace.h"
12 |
13 | @implementation FBUnattachedAppLauncher
14 |
15 | + (BOOL)launchAppWithBundleId:(NSString *)bundleId {
16 | return [[LSApplicationWorkspace defaultWorkspace] openApplicationWithBundleID:bundleId];
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBW3CActionsSynthesizer.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBBaseActionsSynthesizer.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | #if !TARGET_OS_TV
15 | @interface FBW3CActionsSynthesizer : FBBaseActionsSynthesizer
16 |
17 | @end
18 | #endif
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBXCTestCaseImplementationFailureHoldingProxy.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @class _XCTestCaseImplementation;
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | Class that can be used to proxy existing _XCTestCaseImplementation and
18 | prevent currently running test from being terminated on any XCTest failure
19 | */
20 | @interface FBXCTestCaseImplementationFailureHoldingProxy : NSProxy
21 |
22 | /**
23 | Constructor for given existing _XCTestCaseImplementation instance
24 | */
25 | + (instancetype)proxyWithXCTestCaseImplementation:(_XCTestCaseImplementation *)internalImplementation;
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBXCTestCaseImplementationFailureHoldingProxy.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBXCTestCaseImplementationFailureHoldingProxy.h"
11 |
12 | #import
13 |
14 | @interface FBXCTestCaseImplementationFailureHoldingProxy ()
15 | @property (nonatomic, strong) _XCTestCaseImplementation *internalImplementation;
16 | @end
17 |
18 | @implementation FBXCTestCaseImplementationFailureHoldingProxy
19 |
20 | + (instancetype)proxyWithXCTestCaseImplementation:(_XCTestCaseImplementation *)internalImplementation
21 | {
22 | FBXCTestCaseImplementationFailureHoldingProxy *proxy = [super alloc];
23 | proxy.internalImplementation = internalImplementation;
24 | return proxy;
25 | }
26 |
27 | - (id)forwardingTargetForSelector:(SEL)aSelector
28 | {
29 | return self.internalImplementation;
30 | }
31 |
32 | // This will prevent test from quiting on app crash or any other test failure
33 | - (BOOL)shouldHaltWhenReceivesControl
34 | {
35 | return NO;
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/FBXCTestDaemonsProxy.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import "XCSynthesizedEventRecord.h"
12 | #import "XCElementSnapshot.h"
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | @protocol XCTestManager_ManagerInterface;
17 |
18 | /**
19 | Temporary class used to abstract interactions with TestManager daemon between Xcode 8.2.1 and Xcode 8.3-beta
20 | */
21 | @interface FBXCTestDaemonsProxy : NSObject
22 |
23 | + (id)testRunnerProxy;
24 |
25 | #if !TARGET_OS_TV
26 | + (UIInterfaceOrientation)orientationWithApplication:(XCUIApplication *)application;
27 | #endif
28 |
29 | + (XCAccessibilityElement *)requestElementAtPoint:(CGPoint)point;
30 |
31 | + (BOOL)synthesizeEventWithRecord:(XCSynthesizedEventRecord *)record
32 | error:(NSError *__autoreleasing*)error;
33 |
34 | + (XCElementSnapshot *)snapshotForElement:(XCAccessibilityElement *)el
35 | attributes:(NSArray *)atts
36 | parameters:(NSDictionary *)params;
37 |
38 | @end
39 |
40 | NS_ASSUME_NONNULL_END
41 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/NSPredicate+FBFormat.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface NSPredicate (FBFormat)
15 |
16 | /**
17 | Method used to normalize/verify NSPredicate expressions before passing them to WDA.
18 | Only expressions of NSKeyPathExpressionType are going to be verified.
19 | Allowed property names are only these declared in FBElement protocol (property names are received in runtime)
20 | and their shortcuts (without 'wd' prefix). All other property names are considered as unknown.
21 |
22 | @param input predicate object received from user input
23 | @return formatted predicate
24 | @throw FBUnknownPredicateKeyException in case the given property name is not declared in FBElement protocol
25 | */
26 | + (NSPredicate *)fb_formatSearchPredicate:(NSPredicate *)input;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/CFAgentLib/Utilities/XCUIApplicationProcessDelay.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /**
15 | In certain cases WebDriverAgent fails to create a session because -[XCUIApplication launch] doesn't return
16 | since it waits for the target app to be quiescenced.
17 | The reason for this seems to be that 'testmanagerd' doesn't send the events WebDriverAgent is waiting for.
18 | The expected events would trigger calls to '-[XCUIApplicationProcess setEventLoopHasIdled:]' and
19 | '-[XCUIApplicationProcess setAnimationsHaveFinished:]', which are the properties that are checked to
20 | determine whether an app has quiescenced or not.
21 | Delaying the call to on of the setters can fix this issue.
22 | */
23 | @interface XCUIApplicationProcessDelay : NSObject
24 |
25 | /**
26 | Delays the invocation of '-[XCUIApplicationProcess setEventLoopHasIdled:]' by the timer interval passed
27 | @param delay The duration of the sleep before the original method is called
28 | */
29 | + (void)setEventLoopHasIdledDelay:(NSTimeInterval)delay;
30 |
31 | /**
32 | Disables the delayed invocation of '-[XCUIApplicationProcess setEventLoopHasIdled:]'.
33 | */
34 | + (void)disableEventLoopDelay;
35 |
36 | @end
37 |
38 | NS_ASSUME_NONNULL_END
39 |
--------------------------------------------------------------------------------
/CFAgentLib/Vendor/CocoaHTTPServer/LICENSE:
--------------------------------------------------------------------------------
1 | Software License Agreement (BSD License)
2 |
3 | Copyright (c) 2011, Deusty, LLC
4 | All rights reserved.
5 |
6 | Redistribution and use of this software in source and binary forms,
7 | with or without modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above
10 | copyright notice, this list of conditions and the
11 | following disclaimer.
12 |
13 | * Neither the name of Deusty nor the names of its
14 | contributors may be used to endorse or promote products
15 | derived from this software without specific prior
16 | written permission of Deusty, LLC.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/CFAgentLib/Vendor/RoutingHTTPServer/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011 Matt Stevens
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/CFDriverAgent/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | NSLocationAlwaysAndWhenInUseUsageDescription
24 |
25 | NSLocationAlwaysUsageDescription
26 |
27 | NSLocationWhenInUseUsageDescription
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Configurations/IOSSettings.xcconfig:
--------------------------------------------------------------------------------
1 | EXCLUDED_ARCHS = i386
2 |
3 | GCC_TREAT_WARNINGS_AS_ERRORS = YES
4 | GCC_WARN_PEDANTIC = YES
5 | GCC_WARN_SHADOW = YES
6 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES
7 | GCC_WARN_MISSING_PARENTHESES = YES
8 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
9 | GCC_WARN_SIGN_COMPARE = YES
10 | GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES
11 | GCC_WARN_UNUSED_PARAMETER = YES
12 | GCC_WARN_UNUSED_VALUE = YES
13 | GCC_WARN_UNUSED_VARIABLE = YES
14 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES
15 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
16 |
17 | CLANG_ANALYZER_NONNULL = YES
18 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
19 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
20 | CLANG_WARN_ENUM_CONVERSION = YES
21 | CLANG_WARN_INT_CONVERSION = YES
22 | CLANG_WARN_ASSIGN_ENUM = YES
23 | CLANG_WARN_BOOL_CONVERSION = YES
24 | CLANG_WARN_CONSTANT_CONVERSION = YES
25 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
26 |
27 | RUN_CLANG_STATIC_ANALYZER = YES
28 |
29 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited)
30 |
31 | WARNING_CFLAGS = $(inherited) -Weverything -Wno-objc-missing-property-synthesis -Wno-unused-macros -Wno-disabled-macro-expansion -Wno-gnu-statement-expression -Wno-language-extension-token -Wno-overriding-method-mismatch -Wno-missing-variable-declarations -Rno-module-build -Wno-auto-import -Wno-objc-interface-ivars -Wno-documentation-unknown-command -Wno-reserved-id-macro -Wno-unused-parameter -Wno-gnu-conditional-omitted-operand -Wno-explicit-ownership-type -Wno-date-time -Wno-cast-align -Wno-cstring-format-directive -Wno-double-promotion -Wno-partial-availability
32 |
--------------------------------------------------------------------------------
/Configurations/IOSTestSettings.xcconfig:
--------------------------------------------------------------------------------
1 | EXCLUDED_ARCHS = i386
2 |
--------------------------------------------------------------------------------
/Configurations/TVOSSettings.xcconfig:
--------------------------------------------------------------------------------
1 | EXCLUDED_ARCHS = i386
2 |
3 | GCC_TREAT_WARNINGS_AS_ERRORS = YES
4 | GCC_WARN_PEDANTIC = YES
5 | GCC_WARN_SHADOW = YES
6 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES
7 | GCC_WARN_MISSING_PARENTHESES = YES
8 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
9 | GCC_WARN_SIGN_COMPARE = YES
10 | GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES
11 | GCC_WARN_UNUSED_PARAMETER = YES
12 | GCC_WARN_UNUSED_VALUE = YES
13 | GCC_WARN_UNUSED_VARIABLE = YES
14 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES
15 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
16 |
17 | CLANG_ANALYZER_NONNULL = YES
18 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
19 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
20 | CLANG_WARN_ENUM_CONVERSION = YES
21 | CLANG_WARN_INT_CONVERSION = YES
22 | CLANG_WARN_ASSIGN_ENUM = YES
23 | CLANG_WARN_BOOL_CONVERSION = YES
24 | CLANG_WARN_CONSTANT_CONVERSION = YES
25 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
26 |
27 | RUN_CLANG_STATIC_ANALYZER = YES
28 |
29 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited)
30 |
31 | WARNING_CFLAGS = $(inherited) -Weverything -Wno-objc-missing-property-synthesis -Wno-unused-macros -Wno-disabled-macro-expansion -Wno-gnu-statement-expression -Wno-language-extension-token -Wno-overriding-method-mismatch -Wno-missing-variable-declarations -Rno-module-build -Wno-auto-import -Wno-objc-interface-ivars -Wno-documentation-unknown-command -Wno-reserved-id-macro -Wno-unused-parameter -Wno-gnu-conditional-omitted-operand -Wno-explicit-ownership-type -Wno-date-time -Wno-cast-align -Wno-cstring-format-directive -Wno-double-promotion -Wno-partial-availability
32 |
--------------------------------------------------------------------------------
/Configurations/TVOSTestSettings.xcconfig:
--------------------------------------------------------------------------------
1 | EXCLUDED_ARCHS = i386
2 |
3 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD License
2 |
3 | For WebDriverAgent software
4 |
5 | Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
6 |
7 | Redistribution and use in source and binary forms, with or without modification,
8 | are permitted provided that the following conditions are met:
9 |
10 | * Redistributions of source code must retain the above copyright notice, this
11 | list of conditions and the following disclaimer.
12 |
13 | * Redistributions in binary form must reproduce the above copyright notice,
14 | this list of conditions and the following disclaimer in the documentation
15 | and/or other materials provided with the distribution.
16 |
17 | * Neither the name Facebook nor the names of its contributors may be used to
18 | endorse or promote products derived from this software without specific
19 | prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
--------------------------------------------------------------------------------
/PrivateHeaders/AccessibilityUtilities/AXSettings.h:
--------------------------------------------------------------------------------
1 |
2 | /* Generated by RuntimeBrowser
3 | Image: /System/Library/PrivateFrameworks/AccessibilityUtilities.framework/AccessibilityUtilities
4 | */
5 |
6 | @interface AXSettings : NSObject
7 |
8 | @property bool reduceMotionEnabled;
9 |
10 | + (id)sharedInstance;
11 |
12 | - (void)setReduceMotionEnabled:(bool)arg1;
13 | - (bool)reduceMotionEnabled;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/PrivateHeaders/TextInput/TIPreferencesController.h:
--------------------------------------------------------------------------------
1 | /**
2 | * iOS-Runtime-Headers/PrivateFrameworks/TextInput.framework.
3 | * Text Input preferences controller to modify the keyboard preferences for iOS 8+.
4 | *
5 | * Note:
6 | * "autocorrection" will be PrivateFrameworks/TextInput.framework/TIKeyboardState.h in the future?
7 | */
8 | @interface TIPreferencesController : NSObject
9 |
10 | /**
11 | * Whether the autocorrection is enabled.
12 | */
13 | @property BOOL autocorrectionEnabled;
14 |
15 | /**
16 | * Whether the predication is enabled.
17 | * */
18 | @property BOOL predictionEnabled;
19 |
20 | /**
21 | The shared singleton instance.
22 | */
23 | + (instancetype)sharedPreferencesController;
24 |
25 | /**
26 | Synchronise the change to save it on disk.
27 | */
28 | - (void)synchronizePreferences;
29 |
30 | /**
31 | * Modify the preference @c value by the @c key
32 | *
33 | * @param value The value to set it to @c key
34 | * @param key The key name to set @c value to
35 | */
36 | - (void)setValue:(NSValue *)value forPreferenceKey:(NSString *)key;
37 |
38 | /**
39 | * Get the preferenve by @c key
40 | *
41 | * @param key The key name to get the value
42 | * @return Whether the @c key is enabled
43 | */
44 | - (BOOL)boolForPreferenceKey:(NSString *)key;
45 | @end
46 |
--------------------------------------------------------------------------------
/PrivateHeaders/UIKitCore/UIKeyboardImpl.h:
--------------------------------------------------------------------------------
1 | #if TARGET_OS_SIMULATOR
2 | /**
3 | * iOS-Runtime-Headers/PrivateFrameworks/UIKitCore.framework/UIKeyboardImpl.h
4 | */
5 | @interface UIKeyboardImpl
6 | + (instancetype)sharedInstance;
7 | /**
8 | * Modify software keyboard condition on simulators for over Xcode 6
9 | * This setting is global. The change applies to all instances of UIKeyboardImpl.
10 | *
11 | * Idea: https://chromium.googlesource.com/chromium/src/base/+/ababb4cf8b6049a642a2f361b1006a07561c2d96/test/test_support_ios.mm#41
12 | *
13 | * @param enabled Whether turn setAutomaticMinimizationEnabled on
14 | */
15 | - (void)setAutomaticMinimizationEnabled:(BOOL)enabled;
16 |
17 | /**
18 | * Modify software keyboard condition on simulators for over Xcode 6
19 | * This setting is global. The change applies to all instances of UIKeyboardImpl.
20 | *
21 | * Idea: https://chromium.googlesource.com/chromium/src/base/+/ababb4cf8b6049a642a2f361b1006a07561c2d96/test/test_support_ios.mm#41
22 | *
23 | * @param enabled Whether turn setSoftwareKeyboardShownByTouch on
24 | */
25 | - (void)setSoftwareKeyboardShownByTouch:(BOOL)enabled;
26 | @end
27 | #endif // TARGET_IPHONE_SIMULATOR
28 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/CDStructures.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #pragma mark Blocks
8 |
9 | typedef void (^CDUnknownBlockType)(void); // return type and parameters are unknown
10 |
11 | typedef struct {
12 | unsigned int _field1;
13 | unsigned int _field2;
14 | unsigned int _field3;
15 | unsigned int _field4;
16 | unsigned int _field5;
17 | unsigned int _field6;
18 | unsigned int _field7;
19 | } CDStruct_a561fd19;
20 |
21 | typedef struct {
22 | unsigned short _field1;
23 | unsigned short _field2;
24 | unsigned short _field3[1];
25 | } CDStruct_27a325c0;
26 |
27 | int _XCTSetApplicationStateTimeout(double timeout);
28 | double _XCTApplicationStateTimeout(void);
29 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/NSString-XCTAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface NSString (XCTAdditions)
10 | - (id)xct_quotedSwiftStringRepresentation;
11 | @end
12 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/NSValue-XCTestAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface NSValue (XCTestAdditions)
10 | - (id)xct_contentDescription;
11 | @end
12 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/UIGestureRecognizer-RecordingAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface UIGestureRecognizer (RecordingAdditions)
10 | - (id)_automationName;
11 | @end
12 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/UILongPressGestureRecognizer-RecordingAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface UILongPressGestureRecognizer (RecordingAdditions)
10 | - (id)_automationName;
11 | @end
12 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/UIPanGestureRecognizer-RecordingAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface UIPanGestureRecognizer (RecordingAdditions)
10 | - (id)_automationName;
11 | @end
12 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/UIPinchGestureRecognizer-RecordingAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface UIPinchGestureRecognizer (RecordingAdditions)
10 | - (id)_automationName;
11 | @end
12 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/UISwipeGestureRecognizer-RecordingAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface UISwipeGestureRecognizer (RecordingAdditions)
10 | - (id)_automationName;
11 | @end
12 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/UITapGestureRecognizer-RecordingAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface UITapGestureRecognizer (RecordingAdditions)
10 | - (id)_automationName;
11 | @end
12 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCAccessibilityElement.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSString;
8 |
9 | @interface XCAccessibilityElement : NSObject
10 | {
11 | NSString *_context;
12 | id _payload;
13 | int _processIdentifier;
14 | struct __AXUIElement *_axElement;
15 | unsigned long long _elementType;
16 | }
17 | @property(readonly) id payload; // @synthesize payload=_payload;
18 | @property(readonly) int processIdentifier; // @synthesize processIdentifier=_processIdentifier;
19 | @property(readonly) const struct __AXUIElement *AXUIElement; // @synthesize AXUIElement=_axElement;
20 | @property(readonly, getter=isNative) BOOL native;
21 |
22 | + (id)elementWithAXUIElement:(struct __AXUIElement *)arg1;
23 | + (id)elementWithProcessIdentifier:(int)arg1;
24 | + (id)deviceElement;
25 | + (id)mockElementWithProcessIdentifier:(int)arg1 payload:(id)arg2;
26 | + (id)mockElementWithProcessIdentifier:(int)arg1;
27 |
28 | - (id)initWithMockProcessIdentifier:(int)arg1 payload:(id)arg2;
29 | - (id)initWithAXUIElement:(struct __AXUIElement *)arg1;
30 | - (id)init;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCApplicationMonitor_iOS.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface XCApplicationMonitor_iOS : XCApplicationMonitor
10 | {
11 | }
12 |
13 | - (void)_terminateApplicationProcess:(id)arg1;
14 | - (id)monitoredApplicationWithProcessIdentifier:(int)arg1;
15 | - (void)_beginMonitoringApplication:(id)arg1;
16 | - (id)init;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCApplicationQuery.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @class XCElementSnapshot, XCUIApplication;
10 |
11 | @interface XCApplicationQuery : XCUIElementQuery
12 | {
13 | XCUIApplication *_application;
14 | XCElementSnapshot *_lastSnapshot;
15 | }
16 |
17 | @property(retain) XCElementSnapshot *lastSnapshot; // @synthesize lastSnapshot=_lastSnapshot;
18 | - (id)matchingSnapshotsWithError:(id *)arg1;
19 | - (id)application;
20 | - (id)initWithApplication:(id)arg1;
21 |
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCDebugLogDelegate-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSString;
8 |
9 | @protocol XCDebugLogDelegate
10 | - (void)logDebugMessage:(NSString *)arg1;
11 | @end
12 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCDeviceEvent.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @interface XCDeviceEvent : NSObject
8 | {
9 | unsigned int _eventPage;
10 | unsigned int _usage;
11 | double _duration;
12 | unsigned long long _type;
13 | double _rotation;
14 | }
15 | @property unsigned long long type; // @synthesize type=_type;
16 | @property double rotation; // @synthesize rotation=_rotation;
17 | @property double duration; // @synthesize duration=_duration;
18 | @property unsigned int usage; // @synthesize usage=_usage;
19 | @property unsigned int eventPage; // @synthesize eventPage=_eventPage;
20 | @property(readonly) BOOL isButtonHoldEvent;
21 |
22 | + (id)deviceEventForDigitalCrownRotation:(double)arg1 velocity:(double)arg2;
23 | + (id)deviceEventWithPage:(unsigned int)arg1 usage:(unsigned int)arg2 duration:(double)arg3;
24 |
25 | - (void)dispatch;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCElementSnapshot-XCUIElementSnapshot.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "XCElementSnapshot.h"
8 |
9 | //#import "XCUIElementSnapshot.h"
10 |
11 | @class NSArray, NSDictionary, NSString;
12 |
13 | @interface XCElementSnapshot (XCUIElementSnapshot)
14 | @property(readonly, copy) NSDictionary *dictionaryRepresentation;
15 |
16 | // Remaining properties
17 | @property(readonly) NSArray *children;
18 | @property(readonly) unsigned long long elementType;
19 | @property(readonly, getter=isEnabled) _Bool enabled;
20 | @property(readonly) struct CGRect frame;
21 | @property(readonly) long long horizontalSizeClass;
22 | @property(readonly) NSString *identifier;
23 | @property(readonly, copy) NSString *label;
24 | @property(readonly) NSString *placeholderValue;
25 | @property(readonly, getter=isSelected) _Bool selected;
26 | @property(readonly, copy) NSString *title;
27 | @property(readonly) id value;
28 | @property(readonly) long long verticalSizeClass;
29 | @end
30 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCKeyMappingPath.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSSet, NSString;
8 |
9 | @interface XCKeyMappingPath : NSObject
10 | {
11 | unsigned long long _keyState;
12 | XCKeyMappingPath *_next;
13 | NSSet *_inputs;
14 | NSString *_output;
15 | unsigned long long _length;
16 | NSString *_producedString;
17 | }
18 | @property(readonly, copy) NSString *producedString; // @synthesize producedString=_producedString;
19 | @property(readonly) unsigned long long length; // @synthesize length=_length;
20 | @property(readonly, copy) NSString *output; // @synthesize output=_output;
21 | @property(readonly, copy) NSSet *inputs; // @synthesize inputs=_inputs;
22 | @property(readonly, copy) XCKeyMappingPath *next; // @synthesize next=_next;
23 | @property(readonly) unsigned long long keyState; // @synthesize keyState=_keyState;
24 | @property(readonly, getter=isEmpty) BOOL empty;
25 | @property(readonly, getter=isComplete) BOOL complete;
26 |
27 | + (id)pathWithKeyState:(unsigned long long)arg1 next:(id)arg2 inputs:(id)arg3 output:(id)arg4;
28 | + (id)emptyPath;
29 |
30 | - (id)inputSequenceWithRequiredFlags:(unsigned long long)arg1 excludedFlags:(unsigned long long)arg2;
31 | - (id)inputWithRequiredFlags:(unsigned long long)arg1 excludedFlags:(unsigned long long)arg2;
32 |
33 | - (id)initWithKeyState:(unsigned long long)arg1 next:(id)arg2 inputs:(id)arg3 output:(id)arg4;
34 | - (id)init;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCKeyboardLayout.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSArray, NSData, NSString, XCKeyboardKeyMap;
8 |
9 | @interface XCKeyboardLayout : NSObject
10 | {
11 | struct __GSKeyboard *_source;
12 | NSString *_identifier;
13 | NSData *_data;
14 | NSArray *_keyMaps;
15 | XCKeyboardKeyMap *_primaryKeyMap;
16 | }
17 | @property(readonly) XCKeyboardKeyMap *primaryKeyMap; // @synthesize primaryKeyMap=_primaryKeyMap;
18 | @property(readonly, copy) NSString *identifier; // @synthesize identifier=_identifier;
19 |
20 | + (id)unicodeHexKeyboardLayout;
21 | + (id)currentKeyboardLayout;
22 | + (void)enumerateKeyboardLayoutsUsingBlock:(CDUnknownBlockType)arg1;
23 | + (id)keyboardLayoutWithInputSource:(struct __GSKeyboard *)arg1;
24 | + (id)keyboardLayoutWithIdentifier:(id)arg1;
25 |
26 | - (BOOL)deactivate:(id)arg1 error:(id *)arg2;
27 | - (id)activateWithError:(id *)arg1;
28 | - (id)_setActiveLayoutState:(id)arg1 error:(id *)arg2;
29 | - (void)enumerateKeyMapsUsingBlock:(CDUnknownBlockType)arg1;
30 | - (id)keyMapForKeyboardType:(unsigned long long)arg1;
31 |
32 | - (id)initWithInputSource:(struct __GSKeyboard *)arg1;
33 | - (id)init;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCPointerEvent.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @interface XCPointerEvent : NSObject
8 | {
9 | unsigned long long _eventType;
10 | unsigned long long _buttonType;
11 | double _pressure;
12 | double _offset;
13 | struct CGPoint _coordinate;
14 | }
15 | @property double offset; // @synthesize offset=_offset;
16 | @property double pressure; // @synthesize pressure=_pressure;
17 | @property struct CGPoint coordinate; // @synthesize coordinate=_coordinate;
18 | @property unsigned long long buttonType; // @synthesize buttonType=_buttonType;
19 | @property unsigned long long eventType; // @synthesize eventType=_eventType;
20 |
21 | + (CDUnknownBlockType)offsetComparator;
22 | + (id)pointerEventWithType:(unsigned long long)arg1 buttonType:(unsigned long long)arg2 coordinate:(struct CGPoint)arg3 pressure:(double)arg4 offset:(double)arg5;
23 | + (id)pointerEventWithType:(unsigned long long)arg1 buttonType:(unsigned long long)arg2 coordinate:(struct CGPoint)arg3 offset:(double)arg4;
24 | // available since Xcode 10.2
25 | + (id)keyboardEventForKeyCode:(unsigned long long)arg1 keyPhase:(unsigned long long)arg2 modifierFlags:(unsigned long long)arg3 offset:(double)arg4;
26 |
27 |
28 | - (id)init;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCSourceCodeTreeNodeEnumerator.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSMutableArray;
8 |
9 | @interface XCSourceCodeTreeNodeEnumerator : NSObject
10 | {
11 | NSMutableArray *_remainingNodes;
12 | }
13 |
14 | - (id)nextObject;
15 | - (id)initWithNode:(id)arg1;
16 |
17 | @end
18 |
19 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCSymbolicationRecord.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSString;
8 |
9 | @interface XCSymbolicationRecord : NSObject
10 | {
11 | unsigned long long _lineNumber;
12 | NSString *_filePath;
13 | NSString *_symbolName;
14 | NSString *_symbolOwner;
15 | }
16 | @property(copy) NSString *symbolOwner; // @synthesize symbolOwner=_symbolOwner;
17 | @property(copy) NSString *symbolName; // @synthesize symbolName=_symbolName;
18 | @property(copy) NSString *filePath; // @synthesize filePath=_filePath;
19 | @property unsigned long long lineNumber; // @synthesize lineNumber=_lineNumber;
20 |
21 | + (id)symbolicationRecordFromRemoteServiceForAddress:(unsigned long long)arg1;
22 | + (id)symbolicationRecordForTask:(unsigned int)arg1 address:(unsigned long long)arg2;
23 | + (id)symbolicationRecordForAddress:(unsigned long long)arg1;
24 | + (void)_setCurrentProcessIsRemoteService;
25 | + (id)_symbolicationRecordForSymbolicator:(struct _CSTypeRef)arg1 address:(unsigned long long)arg2;
26 | + (id)failureRecord;
27 | + (BOOL)softLinkCoreSymbolication;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCSymbolicatorHolder.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @interface XCSymbolicatorHolder : NSObject
8 | {
9 | struct _CSTypeRef _symbolicator;
10 | }
11 |
12 | @property struct _CSTypeRef symbolicator; // @synthesize symbolicator=_symbolicator;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCSynthesizedEventRecord.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSArray, NSMutableArray, NSString, XCPointerEventPath;
8 |
9 | @interface XCSynthesizedEventRecord : NSObject
10 | {
11 | NSMutableArray *_eventPaths;
12 | NSString *_name;
13 | #if !TARGET_OS_TV
14 | UIInterfaceOrientation _interfaceOrientation;
15 | #endif
16 | }
17 | #if !TARGET_OS_TV
18 | @property(readonly) UIInterfaceOrientation interfaceOrientation; // @synthesize interfaceOrientation=_interfaceOrientation;
19 | #endif
20 | @property(readonly, copy) NSString *name; // @synthesize name=_name;
21 | @property(readonly) double maximumOffset;
22 | @property(readonly) NSArray *eventPaths;
23 |
24 | - (void)addPointerEventPath:(XCPointerEventPath *)arg1;
25 | #if !TARGET_OS_TV
26 | - (id)initWithName:(NSString *)arg1 interfaceOrientation:(UIInterfaceOrientation)arg2;
27 | #endif
28 | - (id)init;
29 | - (BOOL)synthesizeWithError:(NSError **)arg1;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTAXClient-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class NSData;
10 |
11 | @protocol XCTAXClient
12 | - (void)handleAccessibilityNotification:(int)arg1 withPayload:(NSData *)arg2;
13 | @end
14 |
15 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTAsyncActivity-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class NSError;
10 |
11 | @protocol XCTAsyncActivity
12 | @property(readonly) BOOL timedOut;
13 | @property(readonly) NSError *error;
14 | - (void)finishWithError:(NSError *)arg1;
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTAsyncActivity.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | #import "XCTAsyncActivity.h"
10 |
11 | @class NSError, NSString;
12 |
13 | @interface XCTAsyncActivity : XCTestExpectation
14 | {
15 | NSError *_error;
16 | BOOL _timedOut;
17 | }
18 | @property BOOL timedOut; // @synthesize timedOut=_timedOut;
19 | @property(retain) NSError *error; // @synthesize error=_error;
20 |
21 | - (void)finishWithError:(id)arg1;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTAutomationTarget-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @protocol XCTAutomationTarget
10 | - (void)requestHostAppExecutableNameWithReply:(void (^)(NSString *))arg1;
11 | @end
12 |
13 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTDarwinNotificationExpectation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @class NSString, _XCTDarwinNotificationExpectationImplementation;
10 |
11 | @interface XCTDarwinNotificationExpectation : XCTestExpectation
12 | {
13 | id _internal;
14 | }
15 | @property(retain) _XCTDarwinNotificationExpectationImplementation *internal; // @synthesize internal=_internal;
16 | @property(copy) CDUnknownBlockType handler;
17 | @property(readonly, copy) NSString *notificationName;
18 |
19 | - (void)cleanup;
20 | - (void)fulfill;
21 | - (id)initWithNotificationName:(id)arg1;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTElementSetTransformer-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 9 2015 22:53:21).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2014 by Steve Nygard.
5 | //
6 |
7 | @class NSOrderedSet, NSSet, NSString, XCElementSnapshot;
8 | @protocol XCTMatchingElementIterator;
9 |
10 | @protocol XCTElementSetTransformer
11 | @property BOOL stopsOnFirstMatch;
12 | @property(readonly) BOOL supportsAttributeKeyPathAnalysis;
13 | @property(copy) NSString *transformationDescription;
14 | @property(readonly) BOOL supportsRemoteEvaluation;
15 | - (NSSet *)requiredKeyPathsOrError:(id *)arg1;
16 | - (id )iteratorForInput:(XCElementSnapshot *)arg1;
17 | - (NSOrderedSet *)transform:(NSOrderedSet *)arg1 relatedElements:(id *)arg2;
18 | @end
19 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTKVOExpectation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @class NSString, _XCKVOExpectationImplementation;
10 |
11 | @interface XCTKVOExpectation : XCTestExpectation
12 | {
13 | id _internal;
14 | }
15 | @property(retain) _XCKVOExpectationImplementation *internal; // @synthesize internal=_internal;
16 | @property(copy) CDUnknownBlockType handler;
17 | @property(readonly) unsigned long long options;
18 | @property(readonly) id expectedValue;
19 | @property(readonly) id observedObject;
20 | @property(readonly, copy) NSString *keyPath;
21 |
22 | - (void)cleanup;
23 | - (void)fulfill;
24 | - (id)initWithKeyPath:(id)arg1 object:(id)arg2;
25 | - (id)initWithKeyPath:(id)arg1 object:(id)arg2 expectedValue:(id)arg3;
26 | - (id)initWithKeyPath:(id)arg1 object:(id)arg2 expectedValue:(id)arg3 options:(unsigned long long)arg4;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTMetric.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class NSArray, NSDictionary, NSString;
10 |
11 | @interface XCTMetric : NSObject
12 | {
13 | NSString *_identifier;
14 | NSString *_name;
15 | NSString *_units;
16 | NSDictionary *_baseline;
17 | NSDictionary *_defaultBaseline;
18 | NSArray *_measurements;
19 | }
20 | @property(copy) NSArray *measurements; // @synthesize measurements=_measurements;
21 | @property(copy) NSDictionary *defaultBaseline; // @synthesize defaultBaseline=_defaultBaseline;
22 | @property(copy) NSDictionary *baseline; // @synthesize baseline=_baseline;
23 | @property(copy) NSString *units; // @synthesize units=_units;
24 | @property(copy) NSString *name; // @synthesize name=_name;
25 | @property(copy) NSString *identifier; // @synthesize identifier=_identifier;
26 |
27 | - (id)init;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTNSNotificationExpectation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @class NSNotificationCenter, NSString, _XCTNSNotificationExpectationImplementation;
10 |
11 | @interface XCTNSNotificationExpectation : XCTestExpectation
12 | {
13 | id _internal;
14 | }
15 | @property(retain) _XCTNSNotificationExpectationImplementation *internal; // @synthesize internal=_internal;
16 | @property(copy) CDUnknownBlockType handler;
17 | @property(readonly) NSNotificationCenter *notificationCenter;
18 | @property(readonly, copy) NSString *notificationName;
19 | @property(readonly) id observedObject;
20 |
21 | - (void)cleanup;
22 | - (void)fulfill;
23 | - (id)initWithName:(id)arg1;
24 | - (id)initWithName:(id)arg1 object:(id)arg2;
25 | - (id)initWithName:(id)arg1 object:(id)arg2 notificationCenter:(id)arg3;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTNSPredicateExpectation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @class NSPredicate, _XCTNSPredicateExpectationImplementation;
10 |
11 | @interface XCTNSPredicateExpectation : XCTestExpectation
12 | {
13 | id _internal;
14 | }
15 | @property(retain) _XCTNSPredicateExpectationImplementation *internal; // @synthesize internal=_internal;
16 | @property(copy) CDUnknownBlockType handler;
17 | @property(readonly, copy) NSPredicate *predicate;
18 | @property(readonly) id object;
19 |
20 | - (void)cleanup;
21 | - (void)fulfill;
22 | - (id)initWithPredicate:(id)arg1 object:(id)arg2;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTNSPredicateExpectationObject-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class XCTNSPredicateExpectation;
10 |
11 | @protocol XCTNSPredicateExpectationObject
12 |
13 | @optional
14 | - (BOOL)evaluatePredicateForExpectation:(XCTNSPredicateExpectation *)arg1 debugMessage:(id *)arg2;
15 | @end
16 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTRunnerAutomationSession.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | #import "XCTRunnerAutomationSession.h"
10 |
11 | @class NSString, NSXPCConnection;
12 |
13 | @interface XCTRunnerAutomationSession : NSObject
14 | {
15 | NSXPCConnection *_connection;
16 | }
17 | @property NSXPCConnection *connection; // @synthesize connection=_connection;
18 |
19 | - (id)initWithEndpoint:(id)arg1;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTTestRunSession.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class XCTestConfiguration;
10 |
11 | @interface XCTTestRunSession : NSObject
12 | {
13 | XCTestConfiguration *_testConfiguration;
14 | id _delegate;
15 | }
16 | @property id delegate; // @synthesize delegate=_delegate;
17 | @property(retain) XCTestConfiguration *testConfiguration; // @synthesize testConfiguration=_testConfiguration;
18 |
19 | - (BOOL)runTestsAndReturnError:(id *)arg1;
20 | - (BOOL)_preTestingInitialization;
21 | - (void)resumeAppSleep:(id)arg1;
22 | - (id)suspendAppSleep;
23 | - (id)initWithTestConfiguration:(id)arg1 delegate:(id)arg2;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTTestRunSessionDelegate-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class NSError, XCTTestRunSession;
10 |
11 | @protocol XCTTestRunSessionDelegate
12 | - (void)testRunSessionDidFinishExecutingTestPlan:(XCTTestRunSession *)arg1 reply:(void (^)(void))arg2;
13 | - (void)testRunSession:(XCTTestRunSession *)arg1 initializationForUITestingDidFailWithError:(NSError *)arg2;
14 | - (void)testRunSessionDidBeginInitializingForUITesting:(XCTTestRunSession *)arg1;
15 | - (void)testRunSessionDidBeginExecutingTestPlan:(XCTTestRunSession *)arg1;
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTUIApplicationMonitor-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class NSNumber, NSString;
10 |
11 | @protocol XCTUIApplicationMonitor
12 | - (void)applicationWithBundleID:(NSString *)arg1 didUpdatePID:(int)arg2 state:(unsigned long long)arg3;
13 | - (void)processWithToken:(NSNumber *)arg1 exitedWithStatus:(int)arg2;
14 | - (void)stopTrackingProcessWithToken:(NSNumber *)arg1;
15 | - (void)crashInProcessWithBundleID:(NSString *)arg1 path:(NSString *)arg2 pid:(int)arg3 symbol:(NSString *)arg4;
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTWaiterDelegate-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class NSArray, XCTWaiter, XCTestExpectation;
10 |
11 | @protocol XCTWaiterDelegate
12 | - (void)waiter:(XCTWaiter *)arg1 didFulfillInvertedExpectation:(XCTestExpectation *)arg2;
13 | - (void)waiter:(XCTWaiter *)arg1 fulfillmentDidViolateOrderingConstraintsForExpectation:(XCTestExpectation *)arg2 requiredExpectation:(XCTestExpectation *)arg3;
14 | - (void)waiter:(XCTWaiter *)arg1 didTimeoutWithUnfulfilledExpectations:(NSArray *)arg2;
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTWaiterDelegatePrivate-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class XCTWaiter;
8 |
9 | @protocol XCTWaiterDelegatePrivate
10 | - (void)nestedWaiter:(XCTWaiter *)arg1 wasInterruptedByTimedOutWaiter:(XCTWaiter *)arg2;
11 | @end
12 |
13 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTWaiterManagement-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @protocol XCTWaiterManagement
10 | @property(readonly, getter=isInProgress) BOOL inProgress;
11 | - (void)interruptForWaiter:(id )arg1;
12 | @end
13 |
14 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTWaiterManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class NSMutableArray, NSObject, NSThread;
10 |
11 | @interface XCTWaiterManager : NSObject
12 | {
13 | NSMutableArray *_waiterStack;
14 | NSThread *_thread;
15 | NSObject *_queue;
16 | }
17 | @property(readonly) NSObject *queue; // @synthesize queue=_queue;
18 | @property NSThread *thread; // @synthesize thread=_thread;
19 | @property(retain) NSMutableArray *waiterStack; // @synthesize waiterStack=_waiterStack;
20 |
21 | + (id)threadLocalManager;
22 |
23 | - (void)waiterDidFinishWaiting:(id)arg1;
24 | - (void)waiterTimedOutWhileWaiting:(id)arg1;
25 | - (void)waiterWillBeginWaiting:(id)arg1;
26 | - (id)init;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTest.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSString, XCTestRun;
8 |
9 | @interface XCTest : NSObject
10 | {
11 | id _internal;
12 | }
13 | @property(readonly) NSString *nameForLegacyLogging;
14 | @property(readonly) NSString *languageAgnosticTestMethodName;
15 | @property(readonly) NSString *languageAgnosticTestClassName;
16 | @property(readonly) XCTestRun *testRun;
17 | @property(readonly) Class testRunClass;
18 | @property(readonly) Class _requiredTestRunBaseClass;
19 | @property(readonly, copy) NSString *name;
20 | @property(readonly) unsigned long long testCaseCount;
21 | @property(readonly) NSString *_methodNameForReporting;
22 | @property(readonly) NSString *_classNameForReporting;
23 |
24 | + (id)languageAgnosticTestClassNameForTestClass:(Class)arg1;
25 |
26 | - (void)tearDown;
27 | - (void)setUp;
28 | - (void)runTest;
29 | - (id)run;
30 | - (void)performTest:(id)arg1;
31 | - (id)init;
32 | - (void)removeTestsWithNames:(id)arg1;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestCaseRun.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface XCTestCaseRun : XCTestRun
10 | {
11 | }
12 |
13 | - (void)_recordValues:(id)arg1 forPerformanceMetricID:(id)arg2 name:(id)arg3 unitsOfMeasurement:(id)arg4 baselineName:(id)arg5 baselineAverage:(id)arg6 maxPercentRegression:(id)arg7 maxPercentRelativeStandardDeviation:(id)arg8 maxRegression:(id)arg9 maxStandardDeviation:(id)arg10 file:(id)arg11 line:(unsigned long long)arg12;
14 | // Removed since Xcode 12.0
15 | - (void)recordFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(unsigned long long)arg3 expected:(BOOL)arg4;
16 | - (void)recordFailureInTest:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(unsigned long long)arg4 expected:(BOOL)arg5;
17 | - (void)stop;
18 | - (void)start;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestCaseSuite.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface XCTestCaseSuite : XCTestSuite
10 | {
11 | Class _testCaseClass;
12 | }
13 |
14 | + (id)emptyTestSuiteForTestCaseClass:(Class)arg1;
15 | - (void)tearDown;
16 | - (void)setUp;
17 | - (id)initWithTestCaseClass:(Class)arg1;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestContext.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSArray, XCTestContextScope;
8 |
9 | @interface XCTestContext : NSObject
10 | {
11 | BOOL _didHandleUIInterruption;
12 | XCTestContextScope *_currentScope;
13 | }
14 | @property BOOL didHandleUIInterruption; // @synthesize didHandleUIInterruption=_didHandleUIInterruption;
15 | @property(retain, nonatomic) XCTestContextScope *currentScope; // @synthesize currentScope=_currentScope;
16 | @property(readonly, copy) NSArray *handlers;
17 |
18 | + (CDUnknownBlockType)defaultAsynchronousUIElementHandler;
19 |
20 | - (BOOL)handleAsynchronousUIElement:(id)arg1;
21 | - (void)removeUIInterruptionMonitor:(id)arg1;
22 | - (id)addUIInterruptionMonitorWithDescription:(id)arg1 handler:(CDUnknownBlockType)arg2;
23 | - (void)performInScope:(CDUnknownBlockType)arg1;
24 | - (id)init;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestContextScope.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSMutableArray;
8 |
9 | @interface XCTestContextScope : NSObject
10 | {
11 | XCTestContextScope *_parentScope;
12 | NSMutableArray *_handlers;
13 | }
14 | @property(copy) NSMutableArray *handlers; // @synthesize handlers=_handlers;
15 | @property(readonly) XCTestContextScope *parentScope; // @synthesize parentScope=_parentScope;
16 |
17 | - (id)initWithParentScope:(id)arg1;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestDriverInterface-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSNumber;
8 |
9 | @protocol XCTestDriverInterface
10 | - (id)_IDE_processWithToken:(NSNumber *)arg1 exitedWithStatus:(NSNumber *)arg2;
11 | - (id)_IDE_stopTrackingProcessWithToken:(NSNumber *)arg1;
12 | - (id)_IDE_processWithBundleID:(NSString *)arg1 path:(NSString *)arg2 pid:(NSNumber *)arg3 crashedUnderSymbol:(NSString *)arg4;
13 | - (id)_IDE_startExecutingTestPlanWithProtocolVersion:(NSNumber *)arg1;
14 | @end
15 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestExpectation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 |
8 |
9 | @class _XCTestExpectationImplementation;
10 |
11 | @interface XCTestExpectation : NSObject
12 | {
13 | id _internalImplementation;
14 | }
15 | @property BOOL hasBeenWaitedOn;
16 | @property id delegate;
17 | @property(readonly, copy) NSArray *fulfillCallStackReturnAddresses;
18 | @property(readonly) BOOL fulfilled;
19 | @property BOOL hasInverseBehavior;
20 | @property(getter=isInverted) BOOL inverted;
21 | @property(nonatomic) BOOL assertForOverFulfill;
22 | @property(nonatomic) unsigned long long expectedFulfillmentCount;
23 | @property(nonatomic) unsigned long long fulfillmentCount;
24 | @property(readonly) unsigned long long fulfillmentToken;
25 | @property(readonly) _XCTestExpectationImplementation *internalImplementation; // @synthesize internalImplementation=_internalImplementation;
26 | @property(copy) NSString *expectationDescription;
27 | @property(readonly, nonatomic) NSObject *delegateQueue;
28 | @property(readonly, nonatomic) NSObject *queue;
29 |
30 | + (id)expectationWithDescription:(id)arg1;
31 |
32 | - (void)cleanup;
33 | - (void)_queue_fulfillWithCallStackReturnAddresses:(id)arg1;
34 | - (void)fulfill;
35 |
36 | - (id)initWithDescription:(id)arg1;
37 | - (id)init;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestExpectationDelegate-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class XCTestExpectation;
10 |
11 | @protocol XCTestExpectationDelegate
12 | - (void)didFulfillExpectation:(XCTestExpectation *)arg1;
13 | @end
14 |
15 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestExpectationWaiter.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface XCTestExpectationWaiter : XCTWaiter
10 | {
11 | }
12 |
13 | - (long long)wait:(double)arg1 forExpectations:(id)arg2 enforceOrder:(BOOL)arg3;
14 | - (long long)wait:(double)arg1 forExpectations:(id)arg2;
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestManager_TestsInterface-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSData, NSString;
8 |
9 | @protocol XCTestManager_TestsInterface
10 | - (void)_XCT_receivedAccessibilityNotification:(int)arg1 withPayload:(NSData *)arg2;
11 | - (void)_XCT_applicationWithBundleID:(NSString *)arg1 didUpdatePID:(int)arg2 andState:(unsigned long long)arg3;
12 | @end
13 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestMisuseObserver.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | #import "XCTestObservation.h"
10 |
11 | @class NSMutableArray, NSString, XCTestCase, XCTestSuite;
12 |
13 | @interface XCTestMisuseObserver : NSObject
14 | {
15 | CDUnknownBlockType _warningLogHandler;
16 | NSMutableArray *_testSuiteStack;
17 | XCTestCase *_currentTestCase;
18 | }
19 | @property(retain) XCTestCase *currentTestCase; // @synthesize currentTestCase=_currentTestCase;
20 | @property(readonly) NSMutableArray *testSuiteStack; // @synthesize testSuiteStack=_testSuiteStack;
21 | @property(readonly, copy) CDUnknownBlockType warningLogHandler; // @synthesize warningLogHandler=_warningLogHandler;
22 | @property(readonly) XCTestSuite *currentTestSuite;
23 |
24 | - (void)testCaseDidFinish:(id)arg1;
25 | - (void)testCase:(id)arg1 didFailWithDescription:(id)arg2 inFile:(id)arg3 atLine:(unsigned long long)arg4;
26 | - (void)testCaseWillStart:(id)arg1;
27 | - (void)testSuiteDidFinish:(id)arg1;
28 | - (void)testSuiteWillStart:(id)arg1;
29 | - (BOOL)testSuiteStackContainsTestSuite:(id)arg1;
30 | - (void)removeTestSuiteFromStack:(id)arg1;
31 | - (void)popCurrentTestSuite;
32 | - (void)pushTestSuite:(id)arg1;
33 | - (void)emitWarningLog:(id)arg1;
34 |
35 | - (id)initWithWarningLogHandler:(CDUnknownBlockType)arg1;
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestObservation-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSBundle, NSString, XCTestCase, XCTestSuite;
8 |
9 | @protocol XCTestObservation
10 |
11 | @optional
12 | - (void)testCaseDidFinish:(XCTestCase *)arg1;
13 | - (void)testCase:(XCTestCase *)arg1 didFailWithDescription:(NSString *)arg2 inFile:(NSString *)arg3 atLine:(unsigned long long)arg4;
14 | - (void)testCaseWillStart:(XCTestCase *)arg1;
15 | - (void)testSuiteDidFinish:(XCTestSuite *)arg1;
16 | - (void)testSuite:(XCTestSuite *)arg1 didFailWithDescription:(NSString *)arg2 inFile:(NSString *)arg3 atLine:(unsigned long long)arg4;
17 | - (void)testSuiteWillStart:(XCTestSuite *)arg1;
18 | - (void)testBundleDidFinish:(NSBundle *)arg1;
19 | - (void)testBundleWillStart:(NSBundle *)arg1;
20 | @end
21 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestObserver.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @interface XCTestObserver : NSObject
8 | {
9 | }
10 |
11 | - (void)testCaseDidFail:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(unsigned long long)arg4;
12 | - (void)testCaseDidStop:(id)arg1;
13 | - (void)testCaseDidStart:(id)arg1;
14 | - (void)testSuiteDidFail:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(unsigned long long)arg4;
15 | - (void)testSuiteDidStop:(id)arg1;
16 | - (void)testSuiteDidStart:(id)arg1;
17 | - (void)stopObserving;
18 | - (void)startObserving;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestProbe.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @interface XCTestProbe : NSObject
8 | {
9 | }
10 |
11 | + (BOOL)isTesting;
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestRun.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @class NSDate, XCTest, _XCInternalTestRun;
10 |
11 | @interface XCTestRun ()
12 | {
13 | id _internalTestRun;
14 | }
15 | @property(readonly) _XCInternalTestRun *implementation; // @synthesize implementation=_internalTestRun;
16 | @property(readonly) BOOL hasSucceeded;
17 | @property unsigned long long unexpectedExceptionCountBeforeCrash;
18 | @property unsigned long long failureCountBeforeCrash;
19 | @property unsigned long long executionCountBeforeCrash;
20 | @property(readonly) unsigned long long testCaseCount;
21 | @property(readonly) unsigned long long unexpectedExceptionCount;
22 | @property(readonly) unsigned long long failureCount;
23 | @property(readonly) unsigned long long totalFailureCount;
24 | @property(readonly) unsigned long long executionCount;
25 | @property(readonly, copy) NSDate *stopDate;
26 | @property(readonly, copy) NSDate *startDate;
27 | @property(readonly) double testDuration;
28 | @property(readonly) double totalDuration;
29 | @property(readonly) XCTest *test;
30 |
31 | + (id)testRunWithTest:(id)arg1;
32 |
33 | - (void)recordFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(unsigned long long)arg3 expected:(BOOL)arg4;
34 | - (void)stop;
35 | - (void)start;
36 | - (id)init;
37 | - (id)initWithTest:(id)arg1;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestSuiteRun.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @class NSArray, NSMutableArray;
10 |
11 | @interface XCTestSuiteRun : XCTestRun
12 | {
13 | NSMutableArray *_testRuns;
14 | }
15 | @property(readonly, copy) NSArray *testRuns;
16 |
17 | - (void)recordFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(unsigned long long)arg3 expected:(BOOL)arg4;
18 | - (double)testDuration;
19 | - (unsigned long long)unexpectedExceptionCount;
20 | - (unsigned long long)failureCount;
21 | - (unsigned long long)executionCount;
22 | - (void)addTestRun:(id)arg1;
23 | - (void)stop;
24 | - (void)start;
25 |
26 | - (id)initWithTest:(id)arg1;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCTestWaiter.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface XCTestWaiter : XCTWaiter
10 | {
11 | }
12 |
13 | @end
14 |
15 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCUIApplicationImpl.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @class NSString, XCAccessibilityElement, XCUIApplicationProcess;
10 |
11 | @interface XCUIApplicationImpl : NSObject
12 | {
13 | NSString *_path;
14 | NSString *_bundleID;
15 | XCUIApplicationProcess *_currentProcess;
16 | }
17 |
18 | @property(retain, nonatomic) XCUIApplicationProcess *currentProcess; // @synthesize currentProcess=_currentProcess;
19 | @property(readonly, copy) NSString *bundleID; // @synthesize bundleID=_bundleID;
20 | @property(readonly, copy) NSString *path; // @synthesize path=_path;
21 | @property(nonatomic) unsigned long long state;
22 | @property(nonatomic) int processID;
23 | @property(readonly) XCAccessibilityElement *accessibilityElement;
24 |
25 | - (instancetype)initWithPath:(id)arg1 bundleID:(id)arg2;
26 |
27 | - (void)launchWithArguments:(id)arg1 environment:(id)arg2 usingXcode:(BOOL)arg3;
28 | - (void)handleCrashUnderSymbol:(id)arg1;
29 | - (void)terminate;
30 |
31 | - (void)waitForViewControllerViewDidDisappearWithTimeout:(double)arg1;
32 |
33 | - (void)_waitForRunningActive;
34 | - (void)_launchUsingPlatformWithArguments:(id)arg1 environment:(id)arg2;
35 | - (void)_launchUsingXcodeWithArguments:(id)arg1 environment:(id)arg2;
36 | - (void)_waitForLaunchProgress;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCUICoordinate.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 | #import
9 |
10 | @class XCUIElement;
11 |
12 | #if !TARGET_OS_TV
13 | @interface XCUICoordinate ()
14 | {
15 | XCUIElement *_element;
16 | XCUICoordinate *_coordinate;
17 | CGVector _normalizedOffset;
18 | CGVector _pointsOffset;
19 | }
20 |
21 | @property(readonly) CGVector pointsOffset; // @synthesize pointsOffset=_pointsOffset;
22 | @property(readonly) CGVector normalizedOffset; // @synthesize normalizedOffset=_normalizedOffset;
23 | @property(readonly) XCUICoordinate *coordinate; // @synthesize coordinate=_coordinate;
24 | @property(readonly) XCUIElement *element; // @synthesize element=_element;
25 |
26 | - (id)initWithCoordinate:(id)arg1 pointsOffset:(CGVector)arg2;
27 | - (id)initWithElement:(id)arg1 normalizedOffset:(CGVector)arg2;
28 | - (id)init;
29 |
30 | - (void)pressForDuration:(double)arg1 thenDragToCoordinate:(id)arg2;
31 | - (void)pressForDuration:(double)arg1;
32 | - (void)doubleTap;
33 | - (void)tap;
34 |
35 | @end
36 | #endif
37 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCUIDevice.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @interface XCUIDevice ()
10 |
11 | // Since Xcode 10.2
12 | @property (readonly) id accessibilityInterface; // implements XCUIAccessibilityInterface
13 | @property (readonly) id eventSynthesizer; // implements XCUIEventSynthesizing
14 | @property(readonly) id screenDataSource; // @synthesize screenDataSource=_screenDataSource;
15 | - (_Bool)performDeviceEvent:(id)arg1 error:(id *)arg2;
16 |
17 | - (void)pressLockButton;
18 | - (void)holdHomeButtonForDuration:(double)arg1;
19 | - (void)_silentPressButton:(long long)arg1;
20 | // Removed in Xcode 10.2
21 | - (void)_dispatchEventWithPage:(unsigned int)arg1 usage:(unsigned int)arg2 duration:(double)arg3;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCUIElementAsynchronousHandlerWrapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSString, NSUUID;
8 |
9 | @interface XCUIElementAsynchronousHandlerWrapper : NSObject
10 | {
11 | CDUnknownBlockType _handler;
12 | NSString *_handlerDescription;
13 | NSUUID *_identifier;
14 | }
15 | @property(copy) NSUUID *identifier; // @synthesize identifier=_identifier;
16 | @property(copy) NSString *handlerDescription; // @synthesize handlerDescription=_handlerDescription;
17 | @property(copy) CDUnknownBlockType handler; // @synthesize handler=_handler;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCUIElementHitPointCoordinate.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 | #import
9 |
10 | #if !TARGET_OS_IPHONE
11 |
12 | @interface XCUIElementHitPointCoordinate : XCUICoordinate
13 | {
14 | }
15 |
16 | - (id)description;
17 | - (struct CGPoint)screenPoint;
18 | - (id)initWithCoordinate:(id)arg1 pointsOffset:(struct CGVector)arg2;
19 | - (id)initWithElement:(id)arg1 normalizedOffset:(struct CGVector)arg2;
20 | - (id)initWithElement:(id)arg1;
21 |
22 | @end
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCUIHitPointResult.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 | #import
9 |
10 | @interface XCUIHitPointResult : NSObject
11 | {
12 | BOOL _hittable;
13 | CGPoint _hitPoint;
14 | }
15 |
16 | @property(readonly, getter=isHittable) BOOL hittable; // @synthesize hittable=_hittable;
17 | @property(readonly) struct CGPoint hitPoint; // @synthesize hitPoint=_hitPoint;
18 | - (id)initWithHitPoint:(struct CGPoint)arg1 hittable:(BOOL)arg2;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCUIRecorderNodeFinderMatch.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSMutableArray, NSSet, XCSourceCodeTreeNode, XCUIRecorderNodeFinder;
8 |
9 | @interface XCUIRecorderNodeFinderMatch : NSObject
10 | {
11 | NSSet *_matchingSnapshots;
12 | XCSourceCodeTreeNode *_node;
13 | XCUIRecorderNodeFinder *_ancestorFinder;
14 | NSMutableArray *_descendantFinders;
15 | }
16 | @property(retain) NSMutableArray *descendantFinders; // @synthesize descendantFinders=_descendantFinders;
17 | @property(retain) XCUIRecorderNodeFinder *ancestorFinder; // @synthesize ancestorFinder=_ancestorFinder;
18 | @property(retain) XCSourceCodeTreeNode *node; // @synthesize node=_node;
19 | @property(copy) NSSet *matchingSnapshots; // @synthesize matchingSnapshots=_matchingSnapshots;
20 |
21 | - (void)invalidate;
22 | - (id)nodeIncludingDescendants;
23 | - (id)initWithNode:(id)arg1 matchingSnapshots:(id)arg2 ancestorFinder:(id)arg3;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCUIRecorderTimingMessage.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSString;
8 |
9 | @interface XCUIRecorderTimingMessage : NSObject
10 | {
11 | double _start;
12 | NSString *_message;
13 | }
14 | @property(copy) NSString *message; // @synthesize message=_message;
15 | @property double start; // @synthesize start=_start;
16 |
17 | + (id)descriptionForTimingMessages:(id)arg1;
18 | + (id)messageWithString:(id)arg1;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCUIScreen.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Nov 29 2017 14:55:25).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
5 | //
6 |
7 | @interface XCUIScreen()
8 | {
9 | _Bool _isMainScreen;
10 | int _displayID;
11 | }
12 | @property(readonly) _Bool isMainScreen; // @synthesize isMainScreen=_isMainScreen;
13 | @property(readonly) int displayID; // @synthesize displayID=_displayID;
14 |
15 | - (id)_clippedScreenshotData:(id)arg1 quality:(long long)arg2 rect:(struct CGRect)arg3 scale:(double)arg4;
16 | - (id)_screenshotDataForQuality:(long long)arg1 rect:(struct CGRect)arg2 error:(id *)arg3;
17 | - (id)screenshotDataForQuality:(long long)arg1 rect:(struct CGRect)arg2 error:(id *)arg3;
18 | - (id)screenshotDataForQuality:(long long)arg1 rect:(struct CGRect)arg2;
19 | - (id)_modernScreenshotDataForQuality:(long long)arg1 rect:(struct CGRect)arg2 error:(id *)arg3;
20 | - (id)screenshot;
21 | - (id)_imageFromData:(id)arg1;
22 | - (double)scale;
23 | - (id)initWithDisplayID:(int)arg1 isMainScreen:(_Bool)arg2;
24 |
25 | @end
26 |
27 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/XCUIScreenDataSource-Protocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSString;
8 |
9 | @protocol XCUIScreenDataSource
10 | - (void)requestScreenshotOfScreenWithID:(long long)arg1
11 | withRect:(struct CGRect)arg2
12 | scale:(double)arg3
13 | formatUTI:(NSString *)arg4
14 | compressionQuality:(double)arg5
15 | withReply:(void (^)(NSData *, NSError *))arg6;
16 | - (void)requestScaleForScreenWithIdentifier:(long long)arg1 completion:(void (^)(double, NSError *))arg2;
17 | - (void)requestScreenIdentifiersWithCompletion:(void (^)(NSArray *, NSError *))arg1;
18 | @end
19 |
20 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/_XCKVOExpectationImplementation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class NSObject, NSString, XCTKVOExpectation;
10 |
11 | @interface _XCKVOExpectationImplementation : NSObject
12 | {
13 | XCTKVOExpectation *_expectation;
14 | id _observedObject;
15 | NSString *_keyPath;
16 | id _expectedValue;
17 | unsigned long long _options;
18 | CDUnknownBlockType _handler;
19 | NSObject *_queue;
20 | BOOL _hasCleanedUp;
21 | }
22 | @property(readonly) unsigned long long options; // @synthesize options=_options;
23 | @property(readonly) id expectedValue; // @synthesize expectedValue=_expectedValue;
24 | @property(readonly, copy) NSString *keyPath; // @synthesize keyPath=_keyPath;
25 | @property(readonly) id observedObject; // @synthesize observedObject=_observedObject;
26 | @property(copy) CDUnknownBlockType handler;
27 |
28 | - (void)cleanup;
29 | - (void)observeValueForKeyPath:(id)arg1 ofObject:(id)arg2 change:(id)arg3 context:(void *)arg4;
30 | - (id)initWithKeyPath:(id)arg1 object:(id)arg2 expectedValue:(id)arg3 expectation:(id)arg4 options:(unsigned long long)arg5;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/_XCTDarwinNotificationExpectationImplementation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class NSObject, NSString, XCTDarwinNotificationExpectation;
10 |
11 | @interface _XCTDarwinNotificationExpectationImplementation : NSObject
12 | {
13 | XCTDarwinNotificationExpectation *_expectation;
14 | NSString *_notificationName;
15 | int _notifyToken;
16 | CDUnknownBlockType _handler;
17 | NSObject *_queue;
18 | BOOL _hasCleanedUp;
19 | }
20 | @property(readonly, copy) NSString *notificationName; // @synthesize notificationName=_notificationName;
21 | @property(copy) CDUnknownBlockType handler;
22 |
23 | - (void)cleanup;
24 | - (void)_handleNotification;
25 | - (id)initWithNotificationName:(id)arg1 expectation:(id)arg2;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/_XCTNSNotificationExpectationImplementation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class NSNotificationCenter, NSObject, NSString, XCTNSNotificationExpectation;
10 |
11 | @interface _XCTNSNotificationExpectationImplementation : NSObject
12 | {
13 | XCTNSNotificationExpectation *_expectation;
14 | id _observedObject;
15 | NSString *_notificationName;
16 | NSNotificationCenter *_notificationCenter;
17 | CDUnknownBlockType _handler;
18 | NSObject *_queue;
19 | BOOL _hasCleanedUp;
20 | }
21 | @property(readonly) NSNotificationCenter *notificationCenter; // @synthesize notificationCenter=_notificationCenter;
22 | @property(readonly, copy) NSString *notificationName; // @synthesize notificationName=_notificationName;
23 | @property(readonly) id observedObject; // @synthesize observedObject=_observedObject;
24 | @property(copy) CDUnknownBlockType handler;
25 |
26 | - (void)cleanup;
27 | - (void)_observeExpectedNotification:(id)arg1;
28 | - (id)initWithName:(id)arg1 object:(id)arg2 notificationCenter:(id)arg3 expectation:(id)arg4;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/_XCTNSPredicateExpectationImplementation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "NSObject.h"
8 |
9 | @class NSObject, NSPredicate, NSString, NSTimer, XCTNSPredicateExpectation;
10 |
11 | @interface _XCTNSPredicateExpectationImplementation : NSObject
12 | {
13 | XCTNSPredicateExpectation *_expectation;
14 | id _object;
15 | NSPredicate *_predicate;
16 | CDUnknownBlockType _handler;
17 | NSTimer *_timer;
18 | NSObject *_queue;
19 | BOOL _hasCleanedUp;
20 | }
21 | @property(readonly, copy) NSPredicate *predicate; // @synthesize predicate=_predicate;
22 | @property(readonly) id object; // @synthesize object=_object;
23 | @property(copy) CDUnknownBlockType handler;
24 |
25 | - (void)cleanup;
26 | - (void)_considerFulfilling;
27 | - (id)initWithPredicate:(id)arg1 object:(id)arg2 expectation:(id)arg3;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/_XCTestCaseInterruptionException.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @interface _XCTestCaseInterruptionException : NSException
8 | {
9 | }
10 |
11 | + (void)interruptTest;
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/_XCTestImplementation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class XCTestRun;
8 |
9 | @interface _XCTestImplementation : NSObject
10 | {
11 | XCTestRun *_testRun;
12 | }
13 | @property(retain) XCTestRun *testRun; // @synthesize testRun=_testRun;
14 | @end
15 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/_XCTestObservationCenterImplementation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSMutableSet;
8 |
9 | @interface _XCTestObservationCenterImplementation : NSObject
10 | {
11 | NSMutableArray *_observers;
12 | BOOL _suspended;
13 | }
14 |
15 | @property BOOL suspended; // @synthesize suspended=_suspended;
16 | @property(retain) NSMutableArray *observers; // @synthesize observers=_observers;
17 | - (id)init;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/PrivateHeaders/XCTest/_XCTestSuiteImplementation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | @class NSMutableArray, NSString, XCTestConfiguration;
10 |
11 | @interface _XCTestSuiteImplementation : XCTest
12 | {
13 | NSString *_name;
14 | NSMutableArray *_tests;
15 | XCTestConfiguration *_testConfiguration;
16 | }
17 | @property(retain) XCTestConfiguration *testConfiguration; // @synthesize testConfiguration=_testConfiguration;
18 | @property(retain) NSMutableArray *tests; // @synthesize tests=_tests;
19 | @property(copy) NSString *name; // @synthesize name=_name;
20 |
21 | - (id)initWithName:(id)arg1;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ControlFloorAgent
2 |
3 | This repo is deprecated. See [the related issue](https://github.com/dryark/ControlFloorAgent/issues/168)
4 |
5 | ControlFloorAgent is a fork of WebDriverAgent ( WDA ).
6 |
7 | It is a long running test for iOS that can be used to remote control iOS devices. It allows you to launch & kill applications, tap & scroll views or confirm view presence on a screen. It is a tool for app end-to-end testing or general purpose device automation. It works by linking `XCTest.framework` and calling Apple's Xctest API to execute commands directly on a device. It is developed for end-to-end testing.
8 |
9 | ## Features ( inherited from WDA )
10 | * Both iOS and tvOS platforms are supported with devices & simulators
11 | * Implements most of [WebDriver Spec](https://w3c.github.io/webdriver/webdriver-spec.html)
12 | * Implements part of [Mobile JSON Wire Protocol Spec](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md)
13 |
14 | ## License
15 |
16 | [`WebDriverAgent` is BSD-licensed](LICENSE).
17 |
18 | Many files within this fork are [Free Use Anti-Corruption License](AC_LICENSE.TXT).
19 |
20 | It's debatable whether this project can be legally used at all considering the license mixing. You probably shouldn't.
21 | License incompatibility does not mean you are free to use the AC licensed content under BSD terms. It just means the code hasn't been licensed at all and can't be used. This is part of why this project was abandoned and entirely rewritten.
22 |
23 | Facebook, the original authors, provided a [patent grant](PATENTS).
24 |
--------------------------------------------------------------------------------
/WebDriverAgentLib:
--------------------------------------------------------------------------------
1 | CFAgentLib
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "AppDelegate.h"
11 |
12 | @interface AppDelegate ()
13 | @end
14 |
15 | @implementation AppDelegate
16 | @end
17 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/FBAlertViewController.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface FBAlertViewController : UIViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/FBNavigationController.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 | #import
10 |
11 | @interface FBNavigationController : UINavigationController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/FBNavigationController.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBNavigationController.h"
11 |
12 | @implementation FBNavigationController
13 |
14 | #if !TARGET_OS_TV
15 | - (UIInterfaceOrientationMask)supportedInterfaceOrientations
16 | {
17 | return UIInterfaceOrientationMaskAll;
18 | }
19 | #endif
20 |
21 | - (BOOL)shouldAutorotate
22 | {
23 | return YES;
24 | }
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/FBScrollViewController.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface FBScrollViewController : UIViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/FBScrollViewController.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBScrollViewController.h"
11 |
12 | #import "FBTableDataSource.h"
13 |
14 | static const CGFloat FBSubviewHeight = 40.0;
15 |
16 | @interface FBScrollViewController ()
17 | @property (nonatomic, weak) IBOutlet UIScrollView *scrollView;
18 | @property (nonatomic, strong) IBOutlet FBTableDataSource *dataSource;
19 | @end
20 |
21 | @implementation FBScrollViewController
22 |
23 | - (void)viewDidLoad {
24 | [super viewDidLoad];
25 | [self setupLabelViews];
26 | self.scrollView.contentSize = CGSizeMake(CGRectGetWidth(self.view.frame), self.dataSource.count * FBSubviewHeight);
27 | }
28 |
29 | - (void)setupLabelViews
30 | {
31 | NSUInteger count = self.dataSource.count;
32 | for (NSInteger i = 0 ; i < count ; i++) {
33 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, i * FBSubviewHeight, CGRectGetWidth(self.view.frame), FBSubviewHeight)];
34 | label.text = [self.dataSource textForElementAtIndex:i];
35 | label.textAlignment = NSTextAlignmentCenter;
36 | [self.scrollView addSubview:label];
37 | }
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/FBTableDataSource.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface FBTableDataSource : NSObject
13 |
14 | - (NSUInteger)count;
15 | - (NSString *)textForElementAtIndex:(NSInteger)index;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/FBTableDataSource.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBTableDataSource.h"
11 |
12 | @implementation FBTableDataSource
13 |
14 | - (NSUInteger)count
15 | {
16 | return 100;
17 | }
18 |
19 | - (NSString *)textForElementAtIndex:(NSInteger)index
20 | {
21 | return [NSString stringWithFormat:@"%ld", (long)index];
22 | }
23 |
24 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
25 | {
26 | return self.count;
27 | }
28 |
29 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
30 | {
31 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
32 | cell.textLabel.text = [self textForElementAtIndex:indexPath.row];
33 | return cell;
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/TouchSpotView.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface TouchSpotView : UIView
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/TouchSpotView.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "TouchSpotView.h"
11 |
12 | @implementation TouchSpotView
13 |
14 | - (instancetype)initWithFrame:(CGRect)frame
15 | {
16 | self = [super initWithFrame:frame];
17 | if (self) {
18 | self.backgroundColor = UIColor.lightGrayColor;
19 | }
20 | return self;
21 | }
22 |
23 | - (void)setBounds:(CGRect)newBounds
24 | {
25 | super.bounds = newBounds;
26 | self.layer.cornerRadius = newBounds.size.width / 2.0;
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/TouchViewController.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import "TouchableView.h"
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface TouchViewController : UIViewController
16 |
17 | @property (weak, nonatomic) IBOutlet TouchableView *touchable;
18 | @property (weak, nonatomic) IBOutlet UILabel *numberOfTapsLabel;
19 | @property (weak, nonatomic) IBOutlet UILabel *numberOfTouchesLabel;
20 |
21 |
22 | @end
23 |
24 | NS_ASSUME_NONNULL_END
25 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/TouchViewController.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "TouchViewController.h"
11 |
12 | @implementation TouchViewController
13 |
14 | - (void)viewDidLoad
15 | {
16 | [super viewDidLoad];
17 | self.touchable.delegate = self;
18 | self.numberOfTouchesLabel.text = @"0";
19 | self.numberOfTapsLabel.text = @"0";
20 | }
21 |
22 | - (void)shouldHandleTapsNumber:(int)numberOfTaps {
23 | self.numberOfTapsLabel.text = [NSString stringWithFormat:@"%d", numberOfTaps];
24 | }
25 |
26 | - (void)shouldHandleTouchesNumber:(int)touchesCount {
27 | self.numberOfTouchesLabel.text = [NSString stringWithFormat:@"%d", touchesCount];
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/TouchableView.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import "TouchSpotView.h"
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @protocol TouchableViewDelegate
16 |
17 | - (void)shouldHandleTouchesNumber:(int)touchesCount;
18 | - (void)shouldHandleTapsNumber:(int)numberOfTaps;
19 |
20 | @end
21 |
22 | @interface TouchableView : UIView
23 |
24 | @property (nonatomic) NSMutableDictionary *touchViews;
25 | @property (nonatomic) int numberOFTaps;
26 | @property (nonatomic) id delegate;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/Classes/ViewController.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface ViewController : UIViewController
13 | @end
14 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationApp/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, @"AppDelegate");
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationTests/FBConfigurationTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import "FBIntegrationTestCase.h"
12 |
13 | #import "FBConfiguration.h"
14 | #import "FBRuntimeUtils.h"
15 |
16 | @interface FBConfigurationTests : FBIntegrationTestCase
17 |
18 | @end
19 |
20 | @implementation FBConfigurationTests
21 |
22 | - (void)setUp
23 | {
24 | [super setUp];
25 | [self launchApplication];
26 | }
27 |
28 | - (void)testReduceMotion
29 | {
30 | BOOL defaultReduceMotionEnabled = [FBConfiguration reduceMotionEnabled];
31 |
32 | [FBConfiguration setReduceMotionEnabled:YES];
33 | XCTAssertTrue([FBConfiguration reduceMotionEnabled]);
34 |
35 | [FBConfiguration setReduceMotionEnabled:defaultReduceMotionEnabled];
36 | if (isSDKVersionLessThan(@"10.0")) {
37 | XCTAssertFalse([FBConfiguration reduceMotionEnabled]);
38 | } else {
39 | XCTAssertEqual([FBConfiguration reduceMotionEnabled], defaultReduceMotionEnabled);
40 | }
41 | }
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationTests/FBFailureProofTestCaseTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "FBFailureProofTestCase.h"
13 | #import "FBExceptionHandler.h"
14 |
15 | @interface FBFailureProofTestCaseTests : FBFailureProofTestCase
16 | @end
17 |
18 | @implementation FBFailureProofTestCaseTests
19 |
20 | - (void)setUp
21 | {
22 | [super setUp];
23 | [[XCUIApplication new] launch];
24 | }
25 |
26 | - (void)testPreventElementSearchFailure
27 | {
28 | [[XCUIApplication new].buttons[@"kaboom"] tap];
29 | }
30 |
31 | - (void)testInactiveAppSearch
32 | {
33 | [[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome];
34 | [[XCUIApplication new].buttons[@"kaboom"] tap];
35 | }
36 |
37 | - (void)testPreventAssertFailure
38 | {
39 | XCTAssertNotNil(nil);
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationTests/FBScreenTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "FBIntegrationTestCase.h"
13 | #import "FBScreen.h"
14 |
15 | @interface FBScreenTests : FBIntegrationTestCase
16 | @end
17 |
18 | @implementation FBScreenTests
19 |
20 | - (void)setUp
21 | {
22 | [super setUp];
23 | [self launchApplication];
24 | }
25 |
26 | - (void)testScreenScale
27 | {
28 | XCTAssertTrue([FBScreen scale] >= 2);
29 | }
30 |
31 | - (void)testStatusBarSize
32 | {
33 | CGSize statusBarSize = [FBScreen statusBarSizeForApplication:self.testedApplication];
34 | BOOL statusBarSizeIsZero = CGSizeEqualToSize(CGSizeZero, statusBarSize);
35 | XCTAssertFalse(statusBarSizeIsZero);
36 | }
37 |
38 | @end
39 |
40 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationTests/FBTestMacros.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | /**
13 | Macro used to wait till certain condition is true.
14 | If condition will not become true within default timeout (1m) it will fail running test
15 | */
16 | #define FBAssertWaitTillBecomesTrue(condition) \
17 | ({ \
18 | NSError *__error; \
19 | XCTAssertTrue([[[FBRunLoopSpinner new] \
20 | interval:1.0] \
21 | spinUntilTrue:^BOOL{ \
22 | return (condition); \
23 | }]); \
24 | XCTAssertNil(__error); \
25 | })
26 |
27 | #define FBWaitExact(timeoutSeconds) \
28 | ({ \
29 | [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:(timeoutSeconds)]]; \
30 | })
31 |
32 | #define FBCellElementWithLabel(label) ([self.testedApplication descendantsMatchingType:XCUIElementTypeAny][label])
33 | #define FBAssertVisibleCell(label) FBAssertWaitTillBecomesTrue(FBCellElementWithLabel(label).fb_isVisible)
34 | #define FBAssertInvisibleCell(label) FBAssertWaitTillBecomesTrue(!FBCellElementWithLabel(label).fb_isVisible)
35 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.facebook.wda.integrationTests
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationTests/XCElementSnapshotHitPointTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBIntegrationTestCase.h"
11 | #import "FBTestMacros.h"
12 | #import "XCElementSnapshot+FBHitpoint.h"
13 | #import "XCUIElement.h"
14 | #import "XCUIElement+FBUtilities.h"
15 |
16 | @interface XCElementSnapshotHitPoint : FBIntegrationTestCase
17 | @end
18 |
19 | @implementation XCElementSnapshotHitPoint
20 |
21 | - (void)testAccessibilityActivationPoint
22 | {
23 | [self launchApplication];
24 | [self goToAttributesPage];
25 | XCUIElement *dstBtn = self.testedApplication.buttons[@"not_accessible"];
26 | CGPoint hitPoint = dstBtn.fb_takeSnapshot.fb_hitPoint.CGPointValue;
27 | XCTAssertTrue(hitPoint.x > 0 && hitPoint.y > 0);
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/IntegrationTests/XCUIDeviceHealthCheckTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "FBIntegrationTestCase.h"
13 | #import "XCUIDevice+FBHealthCheck.h"
14 | #import "XCUIElement.h"
15 |
16 | @interface XCUIDeviceHealthCheckTests : FBIntegrationTestCase
17 | @end
18 |
19 | @implementation XCUIDeviceHealthCheckTests
20 |
21 | - (void)testHealthCheck
22 | {
23 | [self launchApplication];
24 | XCTAssertTrue(self.testedApplication.exists);
25 | XCTAssertTrue([[XCUIDevice sharedDevice] fb_healthCheckWithApplication:self.testedApplication]);
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/UnitTests/Doubles/FBApplicationDouble.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface FBApplicationDouble : NSObject
13 | @property (nonatomic, assign, readonly) BOOL didTerminate;
14 | @property (nonatomic, strong) NSString* bundleID;
15 | @end
16 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/UnitTests/Doubles/FBApplicationDouble.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "FBApplicationDouble.h"
11 |
12 | @interface FBApplicationDouble ()
13 | @property (nonatomic, assign, readwrite) BOOL didTerminate;
14 | @end
15 |
16 | @implementation FBApplicationDouble
17 |
18 | - (instancetype)init
19 | {
20 | self = [super init];
21 | if (self) {
22 | _bundleID = @"some.bundle.identifier";
23 | }
24 | return self;
25 | }
26 |
27 | - (void)terminate
28 | {
29 | self.didTerminate = YES;
30 | }
31 |
32 | - (NSUInteger)processID
33 | {
34 | return 0;
35 | }
36 |
37 | - (NSString *)bundleID
38 | {
39 | return @"com.facebook.awesome";
40 | }
41 |
42 | - (void)fb_nativeResolve
43 | {
44 |
45 | }
46 |
47 | - (id)query
48 | {
49 | return nil;
50 | }
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/UnitTests/FBConfigurationTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "FBConfiguration.h"
13 |
14 | @interface FBConfigurationTests : XCTestCase
15 |
16 | @end
17 |
18 | @implementation FBConfigurationTests
19 |
20 | - (void)setUp
21 | {
22 | [super setUp];
23 | unsetenv("USE_PORT");
24 | unsetenv("VERBOSE_LOGGING");
25 | }
26 |
27 | - (void)testBindingPortDefault
28 | {
29 | XCTAssertTrue(NSEqualRanges([FBConfiguration bindingPortRange], NSMakeRange(8100, 100)));
30 | }
31 |
32 | - (void)testBindingPortEnvironmentOverwrite
33 | {
34 | setenv("USE_PORT", "1000", 1);
35 | XCTAssertTrue(NSEqualRanges([FBConfiguration bindingPortRange], NSMakeRange(1000, 1)));
36 | }
37 |
38 | - (void)testVerboseLoggingDefault
39 | {
40 | XCTAssertFalse([FBConfiguration verboseLoggingEnabled]);
41 | }
42 |
43 | - (void)testVerboseLoggingEnvironmentOverwrite
44 | {
45 | setenv("VERBOSE_LOGGING", "YES", 1);
46 | XCTAssertTrue([FBConfiguration verboseLoggingEnabled]);
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/UnitTests/FBElementUtilitiesTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 |
11 | #import
12 |
13 | #import "FBElement.h"
14 | #import "XCUIElementDouble.h"
15 | #import "FBElementUtils.h"
16 |
17 | @interface FBElementUtilitiesTests : XCTestCase
18 | @end
19 |
20 | @implementation FBElementUtilitiesTests
21 |
22 | - (void)testTypesFiltering {
23 | NSMutableArray *elements = [NSMutableArray new];
24 | XCUIElementDouble *el1 = [XCUIElementDouble new];
25 | [elements addObject:el1];
26 | XCUIElementDouble *el2 = [XCUIElementDouble new];
27 | el2.elementType = XCUIElementTypeAlert;
28 | el2.wdType = @"XCUIElementTypeAlert";
29 | [elements addObject:el2];
30 | XCUIElementDouble *el3 = [XCUIElementDouble new];
31 | [elements addObject:el3];
32 |
33 | NSSet *result = [FBElementUtils uniqueElementTypesWithElements:elements];
34 | XCTAssertEqual([result count], 2);
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/UnitTests/FBRuntimeUtilsTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "FBRuntimeUtils.h"
13 | #import "XCTestPrivateSymbols.h"
14 |
15 | @protocol FBMagicProtocol
16 | @end
17 |
18 | const NSString *FBRuntimeUtilsTestsConstString = @"FBRuntimeUtilsTestsConstString";
19 |
20 | @interface FBRuntimeUtilsTests : XCTestCase
21 | @end
22 |
23 | @implementation FBRuntimeUtilsTests
24 |
25 | - (void)testClassesThatConformsToProtocol
26 | {
27 | XCTAssertEqualObjects(@[self.class], FBClassesThatConformsToProtocol(@protocol(FBMagicProtocol)));
28 | }
29 |
30 | - (void)testRetrievingFrameworkSymbols
31 | {
32 | NSString *binaryPath = [NSBundle bundleForClass:self.class].executablePath;
33 | NSString *symbolPointer = *(NSString*__autoreleasing*)FBRetrieveSymbolFromBinary(binaryPath.UTF8String, "FBRuntimeUtilsTestsConstString");
34 | XCTAssertNotNil(symbolPointer);
35 | XCTAssertEqualObjects(symbolPointer, FBRuntimeUtilsTestsConstString);
36 | }
37 |
38 | - (void)testXCTestSymbols
39 | {
40 | XCTAssertTrue(XCDebugLogger != NULL);
41 | XCTAssertTrue(XCSetDebugLogger != NULL);
42 | XCTAssertNotNil(FB_XCAXAIsVisibleAttribute);
43 | XCTAssertNotNil(FB_XCAXAIsElementAttribute);
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/UnitTests/FBXMLSafeStringTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "NSString+FBXMLSafeString.h"
13 |
14 | @interface FBXMLSafeStringTests : XCTestCase
15 | @end
16 |
17 | @implementation FBXMLSafeStringTests
18 |
19 | - (void)testSafeXmlStringTransformationWithEmptyReplacement {
20 | NSString *withInvalidChar = [NSString stringWithFormat:@"bla%@", @"\uFFFF"];
21 | NSString *withoutInvalidChar = @"bla";
22 | XCTAssertNotEqualObjects(withInvalidChar, withoutInvalidChar);
23 | XCTAssertEqualObjects([withInvalidChar fb_xmlSafeStringWithReplacement:@""], withoutInvalidChar);
24 | }
25 |
26 | - (void)testSafeXmlStringTransformationWithNonEmptyReplacement {
27 | NSString *withInvalidChar = [NSString stringWithFormat:@"bla%@", @"\uFFFF"];
28 | XCTAssertEqualObjects([withInvalidChar fb_xmlSafeStringWithReplacement:@"1"], @"bla1");
29 | }
30 |
31 | - (void)testSafeXmlStringTransformationWithSmileys {
32 | NSString *validString = @"Yo👿";
33 | XCTAssertEqualObjects([validString fb_xmlSafeStringWithReplacement:@""], validString);
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/UnitTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.facebook.wda.unitTests
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/WebDriverAgentTests/UnitTests_tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.facebook.wda.unitTests
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/lib/check-dependencies.js:
--------------------------------------------------------------------------------
1 | import { fs } from 'appium-support';
2 | import _ from 'lodash';
3 | import { exec } from 'teen_process';
4 | import path from 'path';
5 | import XcodeBuild from './xcodebuild';
6 | import {
7 | WDA_PROJECT, WDA_SCHEME, SDK_SIMULATOR, WDA_RUNNER_APP
8 | } from './constants';
9 | import log from './logger';
10 |
11 | async function buildWDASim () {
12 | const args = [
13 | '-project', WDA_PROJECT,
14 | '-scheme', WDA_SCHEME,
15 | '-sdk', SDK_SIMULATOR,
16 | 'CODE_SIGN_IDENTITY=""',
17 | 'CODE_SIGNING_REQUIRED="NO"',
18 | 'GCC_TREAT_WARNINGS_AS_ERRORS=0',
19 | ];
20 | await exec('xcodebuild', args);
21 | }
22 |
23 | // eslint-disable-next-line require-await
24 | async function checkForDependencies () {
25 | log.debug('Dependencies are up to date');
26 | return false;
27 | }
28 |
29 | async function bundleWDASim (xcodebuild, opts = {}) {
30 | if (xcodebuild && !_.isFunction(xcodebuild.retrieveDerivedDataPath)) {
31 | xcodebuild = new XcodeBuild();
32 | opts = xcodebuild;
33 | }
34 |
35 | const derivedDataPath = await xcodebuild.retrieveDerivedDataPath();
36 | const wdaBundlePath = path.join(derivedDataPath, 'Build', 'Products', 'Debug-iphonesimulator', WDA_RUNNER_APP);
37 | if (await fs.exists(wdaBundlePath)) {
38 | return wdaBundlePath;
39 | }
40 | await checkForDependencies(opts);
41 | await buildWDASim(xcodebuild, opts);
42 | return wdaBundlePath;
43 | }
44 |
45 | export { checkForDependencies, bundleWDASim };
46 |
--------------------------------------------------------------------------------
/lib/constants.js:
--------------------------------------------------------------------------------
1 | import path from 'path';
2 |
3 |
4 | const BOOTSTRAP_PATH = __dirname.endsWith('build')
5 | ? path.resolve(__dirname, '..', '..', '..')
6 | : path.resolve(__dirname, '..', '..');
7 | const WDA_BUNDLE_ID = 'com.apple.test.WebDriverAgentRunner-Runner';
8 | const WDA_PROJECT = path.join(BOOTSTRAP_PATH, 'WebDriverAgent.xcodeproj');
9 | const WDA_SCRIPTS_ROOT = path.join(BOOTSTRAP_PATH, 'Scripts');
10 | const WDA_RUNNER_BUNDLE_ID = 'com.facebook.WebDriverAgentRunner';
11 | const WDA_RUNNER_APP = 'WebDriverAgentRunner-Runner.app';
12 | const WDA_SCHEME = 'WebDriverAgentRunner';
13 | const PROJECT_FILE = 'project.pbxproj';
14 | const WDA_BASE_URL = 'http://127.0.0.1';
15 |
16 | const PLATFORM_NAME_TVOS = 'tvOS';
17 | const PLATFORM_NAME_IOS = 'iOS';
18 |
19 | const SDK_SIMULATOR = 'iphonesimulator';
20 | const SDK_DEVICE = 'iphoneos';
21 |
22 | const WDA_UPGRADE_TIMESTAMP_PATH = path.join('.appium', 'webdriveragent', 'upgrade.time');
23 |
24 | export {
25 | BOOTSTRAP_PATH, WDA_BUNDLE_ID,
26 | WDA_RUNNER_BUNDLE_ID, WDA_RUNNER_APP, PROJECT_FILE,
27 | WDA_PROJECT, WDA_SCHEME,
28 | PLATFORM_NAME_TVOS, PLATFORM_NAME_IOS,
29 | SDK_SIMULATOR, SDK_DEVICE,
30 | WDA_BASE_URL, WDA_SCRIPTS_ROOT, WDA_UPGRADE_TIMESTAMP_PATH
31 | };
32 |
--------------------------------------------------------------------------------
/lib/logger.js:
--------------------------------------------------------------------------------
1 | import { logger } from 'appium-support';
2 |
3 | const log = logger.getLogger('WebDriverAgent');
4 |
5 | export default log;
6 |
--------------------------------------------------------------------------------
/lib/no-session-proxy.js:
--------------------------------------------------------------------------------
1 | import { JWProxy } from 'appium-base-driver';
2 |
3 |
4 | class NoSessionProxy extends JWProxy {
5 | constructor (opts = {}) {
6 | super(opts);
7 | }
8 |
9 | getUrlForProxy (url) {
10 | if (url === '') {
11 | url = '/';
12 | }
13 | const proxyBase = `${this.scheme}://${this.server}:${this.port}${this.base}`;
14 | let remainingUrl = '';
15 | if ((new RegExp('^/')).test(url)) {
16 | remainingUrl = url;
17 | } else {
18 | throw new Error(`Did not know what to do with url '${url}'`);
19 | }
20 | remainingUrl = remainingUrl.replace(/\/$/, ''); // can't have trailing slashes
21 | return proxyBase + remainingUrl;
22 | }
23 | }
24 |
25 | export { NoSessionProxy };
26 | export default NoSessionProxy;
27 |
--------------------------------------------------------------------------------
/libnng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dryark/ControlFloorAgent/b91947e5ef5bdb234f5ebc9f8afb6b8f39f929bb/libnng.a
--------------------------------------------------------------------------------
/nng/compat/nanomsg/bus.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_COMPAT_BUS_H
12 | #define NNG_COMPAT_BUS_H
13 |
14 | // This header contains interfaces that are intended to offer compatibility
15 | // with nanomsg v1.0. These are not the "preferred" interfaces for nng,
16 | // and consumers should only use these if they are porting software that
17 | // previously used nanomsg. New programs should use the nng native APIs.
18 |
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 | // BUS sockopt level.
24 | #define NN_PROTO_BUS 7
25 | #define NN_BUS (NN_PROTO_BUS * 16 + 0)
26 |
27 | // BUS has no options.
28 |
29 | #ifdef __cplusplus
30 | }
31 | #endif
32 |
33 | #endif // NNG_COMPAT_BUS_H
34 |
--------------------------------------------------------------------------------
/nng/compat/nanomsg/inproc.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_COMPAT_INPROC_H
12 | #define NNG_COMPAT_INPROC_H
13 |
14 | // This header contains interfaces that are intended to offer compatibility
15 | // with nanomsg v1.0. These are not the "preferred" interfaces for nng,
16 | // and consumers should only use these if they are porting software that
17 | // previously used nanomsg. New programs should use the nng native APIs.
18 |
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 | // inproc sockopt level.
24 | // There are no inproc tunables.
25 | #define NN_INPROC (-1)
26 |
27 | #ifdef __cplusplus
28 | }
29 | #endif
30 |
31 | #endif // NNG_COMPAT_INPROC_H
32 |
--------------------------------------------------------------------------------
/nng/compat/nanomsg/ipc.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_COMPAT_IPC_H
12 | #define NNG_COMPAT_IPC_H
13 |
14 | // This header contains interfaces that are intended to offer compatibility
15 | // with nanomsg v1.0. These are not the "preferred" interfaces for nng,
16 | // and consumers should only use these if they are porting software that
17 | // previously used nanomsg. New programs should use the nng native APIs.
18 |
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 | // IPC sockopt level.
24 | #define NN_IPC (-2)
25 |
26 | // IPC options. Note that these are not currently supported.
27 | // IPC_SEC_ATTR works quite differently in NNG, and must be
28 | // configured using the new API. The buffer sizing options are
29 | // not supported at all. None of these were ever documented, and
30 | // are offered here only for source compatibility.
31 | #define NN_IPC_SEC_ATTR 1
32 | #define NN_IPC_OUTBUFSZ 2
33 | #define NN_IPC_INBUFSZ 3
34 |
35 | #ifdef __cplusplus
36 | }
37 | #endif
38 |
39 | #endif // NNG_COMPAT_IPC_H
40 |
--------------------------------------------------------------------------------
/nng/compat/nanomsg/pair.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_COMPAT_PAIR_H
12 | #define NNG_COMPAT_PAIR_H
13 |
14 | // This header contains interfaces that are intended to offer compatibility
15 | // with nanomsg v1.0. These are not the "preferred" interfaces for nng,
16 | // and consumers should only use these if they are porting software that
17 | // previously used nanomsg. New programs should use the nng native APIs.
18 |
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 | // PAIR sockopt level.
24 | #define NN_PROTO_PAIR 1
25 | #define NN_PAIR (NN_PROTO_PAIR * 16 + 0)
26 |
27 | // These are technically "new", and not available in nanomsg, but
28 | // offered here as a transition aid. If you want to use the advanced
29 | // PAIRv1 options (POLYAMOROUS mode) you still need to use the new API.
30 | #define NN_PAIR_v0 (NN_PROTO_PAIR * 16 + 0)
31 | #define NN_PAIR_V1 (NN_PROTO_PAIR * 16 + 1)
32 |
33 | // PAIR has no options.
34 |
35 | #ifdef __cplusplus
36 | }
37 | #endif
38 |
39 | #endif // NNG_COMPAT_PAIR_H
40 |
--------------------------------------------------------------------------------
/nng/compat/nanomsg/pipeline.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_COMPAT_PIPELINE_H
12 | #define NNG_COMPAT_PIPELINE_H
13 |
14 | // This header contains interfaces that are intended to offer compatibility
15 | // with nanomsg v1.0. These are not the "preferred" interfaces for nng,
16 | // and consumers should only use these if they are porting software that
17 | // previously used nanomsg. New programs should use the nng native APIs.
18 |
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 | // PUSH and PULL sockopt level.
24 | #define NN_PROTO_PIPELINE 5
25 | #define NN_PUSH (NN_PROTO_PIPELINE * 16 + 0)
26 | #define NN_PULL (NN_PROTO_PIPELINE * 16 + 1)
27 |
28 | // PUSH and PULL have no options.
29 |
30 | #ifdef __cplusplus
31 | }
32 | #endif
33 |
34 | #endif // NNG_COMPAT_PIPELINE_H
35 |
--------------------------------------------------------------------------------
/nng/compat/nanomsg/pubsub.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_COMPAT_PUBSUB_H
12 | #define NNG_COMPAT_PUBSUB_H
13 |
14 | // This header contains interfaces that are intended to offer compatibility
15 | // with nanomsg v1.0. These are not the "preferred" interfaces for nng,
16 | // and consumers should only use these if they are porting software that
17 | // previously used nanomsg. New programs should use the nng native APIs.
18 |
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 | // PUB and SUB sockopt level.
24 | #define NN_PROTO_PUBSUB 2
25 | #define NN_PUB (NN_PROTO_PUBSUB * 16 + 0)
26 | #define NN_SUB (NN_PROTO_PUBSUB * 16 + 1)
27 |
28 | // SUB options. (PUB has none.)
29 | #define NN_SUB_SUBSCRIBE (NN_SUB * 16 + 1)
30 | #define NN_SUB_UNSUBSCRIBE (NN_SUB * 16 + 2)
31 |
32 | #ifdef __cplusplus
33 | }
34 | #endif
35 |
36 | #endif // NNG_COMPAT_PUBSUB_H
37 |
--------------------------------------------------------------------------------
/nng/compat/nanomsg/reqrep.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_COMPAT_REQREP_H
12 | #define NNG_COMPAT_REQREP_H
13 |
14 | // This header contains interfaces that are intended to offer compatibility
15 | // with nanomsg v1.0. These are not the "preferred" interfaces for nng,
16 | // and consumers should only use these if they are porting software that
17 | // previously used nanomsg. New programs should use the nng native APIs.
18 |
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 | // REQ and REP sockopt level.
24 | #define NN_PROTO_REQREP 3
25 | #define NN_REQ (NN_PROTO_REQREP * 16 + 0)
26 | #define NN_REP (NN_PROTO_REQREP * 16 + 1)
27 |
28 | // REQ options. (REP has none.)
29 | #define NN_REQ_RESEND_IVL (NN_REQ * 16 + 1)
30 |
31 | #ifdef __cplusplus
32 | }
33 | #endif
34 |
35 | #endif // NNG_COMPAT_REQREP_H
36 |
--------------------------------------------------------------------------------
/nng/compat/nanomsg/survey.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_COMPAT_SURVEY_H
12 | #define NNG_COMPAT_SURVEY_H
13 |
14 | // This header contains interfaces that are intended to offer compatibility
15 | // with nanomsg v1.0. These are not the "preferred" interfaces for nng,
16 | // and consumers should only use these if they are porting software that
17 | // previously used nanomsg. New programs should use the nng native APIs.
18 |
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 | // SURVEYOR and RESPONDENT sockopt level.
24 | #define NN_PROTO_SURVEY 6
25 | #define NN_SURVEYOR (NN_PROTO_SURVEY * 16 + 2)
26 | #define NN_RESPONDENT (NN_PROTO_SURVEY * 16 + 3)
27 |
28 | // SURVEYOR options. (RESPONDENT has none.)
29 |
30 | #define NN_SURVEYOR_DEADLINE (NN_SURVEYOR * 16 + 1)
31 |
32 | #ifdef __cplusplus
33 | }
34 | #endif
35 |
36 | #endif // NNG_COMPAT_SURVEY_H
37 |
--------------------------------------------------------------------------------
/nng/compat/nanomsg/tcp.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_COMPAT_TCP_H
12 | #define NNG_COMPAT_TCP_H
13 |
14 | // This header contains interfaces that are intended to offer compatibility
15 | // with nanomsg v1.0. These are not the "preferred" interfaces for nng,
16 | // and consumers should only use these if they are porting software that
17 | // previously used nanomsg. New programs should use the nng native APIs.
18 |
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 | // TCP sockopt level.
24 | #define NN_TCP (-3)
25 |
26 | // TCP options.
27 | #define NN_TCP_NODELAY 1
28 |
29 | #ifdef __cplusplus
30 | }
31 | #endif
32 |
33 | #endif // NNG_COMPAT_TCP_H
34 |
--------------------------------------------------------------------------------
/nng/compat/nanomsg/ws.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_COMPAT_WS_H
12 | #define NNG_COMPAT_WS_H
13 |
14 | // This header contains interfaces that are intended to offer compatibility
15 | // with nanomsg v1.0. These are not the "preferred" interfaces for nng,
16 | // and consumers should only use these if they are porting software that
17 | // previously used nanomsg. New programs should use the nng native APIs.
18 |
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 | // WS sockopt level.
24 | #define NN_WS (-4)
25 |
26 | // WS options.
27 |
28 | // Note that while legacy libnanomsg had *some* support for text messages,
29 | // NNG only supports binary. Binary types are required to pass protocol
30 | // headers with NNG and nanomsg in any event. This means that the NNG
31 | // WebSocket support will not be compatible with some very old browsers.
32 | #define NN_WS_MSG_TYPE 1
33 |
34 | #define NN_WS_MSG_TYPE_TEXT 0x1
35 | #define NN_WS_MSG_TYPE_BINARY 0x2
36 |
37 | #ifdef __cplusplus
38 | }
39 | #endif
40 |
41 | #endif // NNG_COMPAT_WS_H
42 |
--------------------------------------------------------------------------------
/nng/protocol/bus0/bus.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_PROTOCOL_BUS0_BUS_H
12 | #define NNG_PROTOCOL_BUS0_BUS_H
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | NNG_DECL int nng_bus0_open(nng_socket *);
19 |
20 | NNG_DECL int nng_bus0_open_raw(nng_socket *);
21 |
22 | #ifndef nng_bus_open
23 | #define nng_bus_open nng_bus0_open
24 | #endif
25 |
26 | #ifndef nng_bus_open_raw
27 | #define nng_bus_open_raw nng_bus0_open_raw
28 | #endif
29 |
30 | #ifdef __cplusplus
31 | }
32 | #endif
33 |
34 | #endif // NNG_PROTOCOL_BUS0_BUS_H
35 |
--------------------------------------------------------------------------------
/nng/protocol/pair0/pair.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_PROTOCOL_PAIR0_PAIR_H
12 | #define NNG_PROTOCOL_PAIR0_PAIR_H
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | NNG_DECL int nng_pair0_open(nng_socket *);
19 |
20 | NNG_DECL int nng_pair0_open_raw(nng_socket *);
21 |
22 | #ifndef nng_pair_open
23 | #define nng_pair_open nng_pair0_open
24 | #endif
25 |
26 | #ifndef nng_pair_open_raw
27 | #define nng_pair_open_raw nng_pair0_open_raw
28 | #endif
29 |
30 | #ifdef __cplusplus
31 | }
32 | #endif
33 |
34 | #endif // NNG_PROTOCOL_PAIR0_PAIR_H
35 |
--------------------------------------------------------------------------------
/nng/protocol/pair1/pair.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2020 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_PROTOCOL_PAIR1_PAIR_H
12 | #define NNG_PROTOCOL_PAIR1_PAIR_H
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | NNG_DECL int nng_pair1_open(nng_socket *);
19 | NNG_DECL int nng_pair1_open_raw(nng_socket *);
20 | NNG_DECL int nng_pair1_open_poly(nng_socket *);
21 |
22 | #ifndef nng_pair_open
23 | #define nng_pair_open nng_pair1_open
24 | #endif
25 |
26 | #ifndef nng_pair_open_raw
27 | #define nng_pair_open_raw nng_pair1_open_raw
28 | #endif
29 |
30 | #define NNG_OPT_PAIR1_POLY "pair1:polyamorous"
31 | #define NNG_PAIR1_SELF 0x11
32 | #define NNG_PAIR1_PEER 0x11
33 | #define NNG_PAIR1_SELF_NAME "pair1"
34 | #define NNG_PAIR1_PEER_NAME "pair1"
35 |
36 | #ifdef __cplusplus
37 | }
38 | #endif
39 |
40 | #endif // NNG_PROTOCOL_PAIR1_PAIR_H
41 |
--------------------------------------------------------------------------------
/nng/protocol/pipeline0/pull.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_PROTOCOL_PIPELINE0_PULL_H
12 | #define NNG_PROTOCOL_PIPELINE0_PULL_H
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | NNG_DECL int nng_pull0_open(nng_socket *);
19 | NNG_DECL int nng_pull0_open_raw(nng_socket *);
20 |
21 | #ifndef nng_pull_open
22 | #define nng_pull_open nng_pull0_open
23 | #endif
24 |
25 | #ifndef nng_pull_open_raw
26 | #define nng_pull_open_raw nng_pull0_open_raw
27 | #endif
28 |
29 | #ifdef __cplusplus
30 | }
31 | #endif
32 |
33 | #endif // NNG_PROTOCOL_PIPELINE0_PULL_H
34 |
--------------------------------------------------------------------------------
/nng/protocol/pipeline0/push.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_PROTOCOL_PIPELINE0_PUSH_H
12 | #define NNG_PROTOCOL_PIPELINE0_PUSH_H
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | NNG_DECL int nng_push0_open(nng_socket *);
19 | NNG_DECL int nng_push0_open_raw(nng_socket *);
20 |
21 | #ifndef nng_push_open
22 | #define nng_push_open nng_push0_open
23 | #endif
24 |
25 | #ifndef nng_push_open_raw
26 | #define nng_push_open_raw nng_push0_open_raw
27 | #endif
28 |
29 | #ifdef __cplusplus
30 | }
31 | #endif
32 |
33 | #endif // NNG_PROTOCOL_PIPELINE0_PUSH_H
34 |
--------------------------------------------------------------------------------
/nng/protocol/pubsub0/pub.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_PROTOCOL_PUBSUB0_PUB_H
12 | #define NNG_PROTOCOL_PUBSUB0_PUB_H
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | NNG_DECL int nng_pub0_open(nng_socket *);
19 | NNG_DECL int nng_pub0_open_raw(nng_socket *);
20 |
21 | #ifndef nng_pub_open
22 | #define nng_pub_open nng_pub0_open
23 | #endif
24 |
25 | #ifndef nng_pub_open_raw
26 | #define nng_pub_open_raw nng_pub0_open_raw
27 | #endif
28 |
29 | #ifdef __cplusplus
30 | }
31 | #endif
32 |
33 | #endif // NNG_PROTOCOL_PUBSUB0_PUB_H
34 |
--------------------------------------------------------------------------------
/nng/protocol/pubsub0/sub.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2018 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_PROTOCOL_PUBSUB0_SUB_H
12 | #define NNG_PROTOCOL_PUBSUB0_SUB_H
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | NNG_DECL int nng_sub0_open(nng_socket *);
19 |
20 | NNG_DECL int nng_sub0_open_raw(nng_socket *);
21 |
22 | #ifndef nng_sub_open
23 | #define nng_sub_open nng_sub0_open
24 | #endif
25 |
26 | #ifndef nng_sub_open_raw
27 | #define nng_sub_open_raw nng_sub0_open_raw
28 | #endif
29 |
30 | #define NNG_OPT_SUB_SUBSCRIBE "sub:subscribe"
31 | #define NNG_OPT_SUB_UNSUBSCRIBE "sub:unsubscribe"
32 |
33 | #define NNG_OPT_SUB_PREFNEW "sub:prefnew"
34 |
35 | #ifdef __cplusplus
36 | }
37 | #endif
38 |
39 | #endif // NNG_PROTOCOL_PUBSUB0_SUB_H
40 |
--------------------------------------------------------------------------------
/nng/protocol/reqrep0/rep.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2020 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_PROTOCOL_REQREP0_REP_H
12 | #define NNG_PROTOCOL_REQREP0_REP_H
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | NNG_DECL int nng_rep0_open(nng_socket *);
19 | NNG_DECL int nng_rep0_open_raw(nng_socket *);
20 |
21 | #ifndef nng_rep_open
22 | #define nng_rep_open nng_rep0_open
23 | #endif
24 |
25 | #ifndef nng_rep_open_raw
26 | #define nng_rep_open_raw nng_rep0_open_raw
27 | #endif
28 |
29 | #define NNG_REP0_SELF 0x31
30 | #define NNG_REP0_PEER 0x30
31 | #define NNG_REP0_SELF_NAME "rep"
32 | #define NNG_REP0_PEER_NAME "req"
33 |
34 | #ifdef __cplusplus
35 | }
36 | #endif
37 |
38 | #endif // NNG_PROTOCOL_REQREP0_REP_H
39 |
--------------------------------------------------------------------------------
/nng/protocol/reqrep0/req.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2020 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_PROTOCOL_REQREP0_REQ_H
12 | #define NNG_PROTOCOL_REQREP0_REQ_H
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | NNG_DECL int nng_req0_open(nng_socket *);
19 | NNG_DECL int nng_req0_open_raw(nng_socket *);
20 |
21 | #ifndef nng_req_open
22 | #define nng_req_open nng_req0_open
23 | #endif
24 | #ifndef nng_req_open_raw
25 | #define nng_req_open_raw nng_req0_open_raw
26 | #endif
27 |
28 | #define NNG_REQ0_SELF 0x30
29 | #define NNG_REQ0_PEER 0x31
30 | #define NNG_REQ0_SELF_NAME "req"
31 | #define NNG_REQ0_PEER_NAME "rep"
32 |
33 | #define NNG_OPT_REQ_RESENDTIME "req:resend-time"
34 |
35 | #ifdef __cplusplus
36 | }
37 | #endif
38 |
39 | #endif // NNG_PROTOCOL_REQREP0_REQ_H
40 |
--------------------------------------------------------------------------------
/nng/protocol/survey0/respond.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2020 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_PROTOCOL_SURVEY0_RESPOND_H
12 | #define NNG_PROTOCOL_SURVEY0_RESPOND_H
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | NNG_DECL int nng_respondent0_open(nng_socket *);
19 | NNG_DECL int nng_respondent0_open_raw(nng_socket *);
20 |
21 | #ifndef nng_respondent_open
22 | #define nng_respondent_open nng_respondent0_open
23 | #endif
24 |
25 | #ifndef nng_respondent_open_raw
26 | #define nng_respondent_open_raw nng_respondent0_open_raw
27 | #endif
28 |
29 | #define NNG_RESPONDENT0_SELF 0x63
30 | #define NNG_RESPONDENT0_PEER 0x62
31 | #define NNG_RESPONDENT0_SELF_NAME "respondent"
32 | #define NNG_RESPONDENT0_PEER_NAME "surveyor"
33 |
34 | #ifdef __cplusplus
35 | }
36 | #endif
37 |
38 | #endif // NNG_PROTOCOL_SURVEY0_RESPOND_H
39 |
--------------------------------------------------------------------------------
/nng/protocol/survey0/survey.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2020 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_PROTOCOL_SURVEY0_SURVEY_H
12 | #define NNG_PROTOCOL_SURVEY0_SURVEY_H
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | NNG_DECL int nng_surveyor0_open(nng_socket *);
19 | NNG_DECL int nng_surveyor0_open_raw(nng_socket *);
20 |
21 | #ifndef nng_surveyor_open
22 | #define nng_surveyor_open nng_surveyor0_open
23 | #endif
24 |
25 | #ifndef nng_surveyor_open_raw
26 | #define nng_surveyor_open_raw nng_surveyor0_open_raw
27 | #endif
28 |
29 | #define NNG_SURVEYOR0_SELF 0x62
30 | #define NNG_SURVEYOR0_PEER 0x63
31 | #define NNG_SURVEYOR0_SELF_NAME "surveyor"
32 | #define NNG_SURVEYOR0_PEER_NAME "respondent"
33 |
34 | #define NNG_OPT_SURVEYOR_SURVEYTIME "surveyor:survey-time"
35 |
36 | #ifdef __cplusplus
37 | }
38 | #endif
39 |
40 | #endif // NNG_PROTOCOL_SURVEY0_SURVEY_H
41 |
--------------------------------------------------------------------------------
/nng/transport/inproc/inproc.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2019 Staysail Systems, Inc.
3 | // Copyright 2017 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_TRANSPORT_INPROC_INPROC_H
12 | #define NNG_TRANSPORT_INPROC_INPROC_H
13 |
14 | #include
15 |
16 | #ifdef __cplusplus
17 | extern "C" {
18 | #endif
19 |
20 | // inproc transport. This is used for intra-process communication.
21 |
22 | NNG_DECL int nng_inproc_register(void);
23 |
24 | #ifdef __cplusplus
25 | }
26 | #endif
27 |
28 | #endif // NNG_TRANSPORT_INPROC_INPROC_H
29 |
--------------------------------------------------------------------------------
/nng/transport/ipc/ipc.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2019 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_TRANSPORT_IPC_IPC_H
12 | #define NNG_TRANSPORT_IPC_IPC_H
13 |
14 | #include
15 |
16 | #ifdef __cplusplus
17 | extern "C" {
18 | #endif
19 |
20 | // ipc transport. This is used for inter-process communication on
21 | // the same host computer.
22 |
23 | NNG_DECL int nng_ipc_register(void);
24 |
25 | #ifdef __cplusplus
26 | }
27 | #endif
28 |
29 | #endif // NNG_TRANSPORT_IPC_IPC_H
30 |
--------------------------------------------------------------------------------
/nng/transport/tcp/tcp.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2019 Staysail Systems, Inc.
3 | // Copyright 2017 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_TRANSPORT_TCP_TCP_H
12 | #define NNG_TRANSPORT_TCP_TCP_H
13 |
14 | #include
15 |
16 | #ifdef __cplusplus
17 | extern "C" {
18 | #endif
19 |
20 | // TCP transport. This is used for communication over TCP/IP.
21 |
22 | NNG_DECL int nng_tcp_register(void);
23 |
24 | #ifdef __cplusplus
25 | }
26 | #endif
27 |
28 | #endif // NNG_TRANSPORT_TCP_TCP_H
29 |
--------------------------------------------------------------------------------
/nng/transport/tls/tls.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2019 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_TRANSPORT_TLS_TLS_H
12 | #define NNG_TRANSPORT_TLS_TLS_H
13 |
14 | #include
15 |
16 | #ifdef __cplusplus
17 | extern "C" {
18 | #endif
19 |
20 | // TLS transport. This is used for communication via TLS v1.2 over TCP/IP.
21 |
22 | NNG_DECL int nng_tls_register(void);
23 |
24 | #ifdef __cplusplus
25 | }
26 | #endif
27 |
28 | #endif // NNG_TRANSPORT_TLS_TLS_H
29 |
--------------------------------------------------------------------------------
/nng/transport/ws/websocket.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2019 Staysail Systems, Inc.
3 | // Copyright 2018 Capitar IT Group BV
4 | //
5 | // This software is supplied under the terms of the MIT License, a
6 | // copy of which should be located in the distribution where this
7 | // file was obtained (LICENSE.txt). A copy of the license may also be
8 | // found online at https://opensource.org/licenses/MIT.
9 | //
10 |
11 | #ifndef NNG_TRANSPORT_WS_WEBSOCKET_H
12 | #define NNG_TRANSPORT_WS_WEBSOCKET_H
13 |
14 | #include
15 |
16 | #ifdef __cplusplus
17 | extern "C" {
18 | #endif
19 |
20 | // WebSocket transport. This is used for communication via WebSocket.
21 |
22 | NNG_DECL int nng_ws_register(void);
23 |
24 | // These aliases are for WSS naming consistency.
25 | #define NNG_OPT_WSS_REQUEST_HEADERS NNG_OPT_WS_REQUEST_HEADERS
26 | #define NNG_OPT_WSS_RESPONSE_HEADERS NNG_OPT_WS_RESPONSE_HEADERS
27 |
28 | NNG_DECL int nng_wss_register(void);
29 |
30 | #ifdef __cplusplus
31 | }
32 | #endif
33 |
34 | #endif // NNG_TRANSPORT_WS_WEBSOCKET_H
35 |
--------------------------------------------------------------------------------