├── Appecker.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ └── contents.xcworkspacedata
├── Appecker
├── Appecker.mm
└── privateHeader
│ └── AppeckerPrivate.h
├── Appecker_Prefix.pch
├── DemoProject
└── AppeckerCompleteDemo
│ ├── ATFCompleteDemo-1.moved-aside
│ └── Wipe.xib
│ ├── AppeckerCompleteDemo-Info.plist
│ ├── AppeckerCompleteDemo.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── AppeckerCompleteDemo_Prefix.pch
│ ├── Atf
│ └── Header
│ │ ├── ATFramework.h
│ │ ├── TestClassProtocol.h
│ │ ├── elements
│ │ ├── ATButton.h
│ │ ├── ATKeyboard.h
│ │ ├── ATLabel.h
│ │ ├── ATMPMoviePlayerController.h
│ │ ├── ATNavigationBar.h
│ │ ├── ATPickerView.h
│ │ ├── ATScrollView.h
│ │ ├── ATSlider.h
│ │ ├── ATSwitch.h
│ │ ├── ATTableView.h
│ │ ├── ATTableViewCell.h
│ │ ├── ATTextField.h
│ │ ├── ATTextView.h
│ │ ├── ATView.h
│ │ ├── ATWebView.h
│ │ ├── ATWindow.h
│ │ └── UIElements.h
│ │ ├── eventSynthesize
│ │ ├── EventProxy.h
│ │ ├── EventSynthesize.h
│ │ └── TouchSynthesize.h
│ │ ├── harness
│ │ ├── ATCaseRunner.h
│ │ ├── ATCasesAssembler.h
│ │ ├── ATException.h
│ │ ├── ATJobSummary.h
│ │ ├── ATLauncher.h
│ │ ├── ATScheduler.h
│ │ ├── ATTestCase.h
│ │ ├── ATTestClass.h
│ │ └── Harness.h
│ │ ├── locator
│ │ ├── ATAndConditions.h
│ │ ├── ATAttributesCondition.h
│ │ ├── ATClassCondition.h
│ │ ├── ATCondition.h
│ │ ├── ATFrameCondition.h
│ │ ├── ATKeywordCondition.h
│ │ ├── ATOrConditions.h
│ │ ├── ATSubViewDescCondition.h
│ │ ├── ATViewQuery.h
│ │ └── Locator.h
│ │ ├── model
│ │ ├── ATAction.h
│ │ ├── ATModel.h
│ │ ├── ATModelEngine.h
│ │ ├── ATRandom.h
│ │ └── model.h
│ │ └── utilities
│ │ ├── ATAssert.h
│ │ ├── ATDispatcher.h
│ │ ├── ATLogger.h
│ │ ├── ATRetryHelper.h
│ │ ├── ATXmlHelper.h
│ │ ├── CaseSelectorParser.h
│ │ └── Utilities.h
│ ├── Basic.xib
│ ├── Classes
│ ├── ATFCompleteDemoAppDelegate.h
│ ├── ATFCompleteDemoAppDelegate.m
│ ├── BasicViewController.h
│ ├── BasicViewController.m
│ ├── MoveScaleImageView.h
│ ├── MoveScaleImageView.m
│ ├── PinchViewController.h
│ ├── PinchViewController.m
│ ├── RootController.h
│ ├── RootController.m
│ ├── SubController.h
│ ├── SubController.m
│ ├── WebViewController.h
│ ├── WebViewController.m
│ ├── WipeViewController.h
│ └── WipeViewController.m
│ ├── MainWindow.xib
│ ├── Testcases
│ ├── MyTestCases.h
│ └── MyTestCases.mm
│ ├── Web.xib
│ ├── Wipe.xib
│ ├── demo.bmp
│ └── main.mm
├── README.md
├── Tool
├── AppeckerControl
│ ├── AppeckerControl.sh
│ └── Tool
│ │ ├── Appid2name.dylib
│ │ ├── Appid2name.plist
│ │ ├── Open.dylib
│ │ ├── Open.plist
│ │ ├── appid2name
│ │ ├── argopen
│ │ └── autorun2.sh
├── appid2name
│ ├── Appid2name.plist
│ ├── Makefile
│ ├── Tweak.xm
│ ├── appid2name.m
│ ├── control
│ └── readyMade
│ │ ├── Appid2name.dylib
│ │ ├── Appid2name.plist
│ │ └── appid2name
├── arg-Open
│ ├── DSDisplayController.h
│ ├── Makefile
│ ├── Open.plist
│ ├── README
│ ├── Tweak.xm
│ ├── control
│ ├── open.m
│ └── readyMade
│ │ ├── Open.dylib
│ │ ├── Open.plist
│ │ └── argopen
├── autorun
│ ├── autorun.sh
│ ├── autorun2.sh
│ └── ios-sim
├── converter
│ └── convert.py
├── ios-sim
│ └── Fingertips-ios-sim
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── README.template.md
│ │ ├── Rakefile
│ │ ├── Source
│ │ ├── .gitignore
│ │ ├── NSString+expandPath.h
│ │ ├── NSString+expandPath.m
│ │ ├── iPhoneSimulator.h
│ │ ├── iPhoneSimulator.m
│ │ ├── main.m
│ │ ├── nsprintf.h
│ │ ├── nsprintf.m
│ │ └── version.h
│ │ ├── iPhoneSimulatorRemoteClient
│ │ └── iPhoneSimulatorRemoteClient.h
│ │ ├── ios-sim.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── ios-sim_Prefix.pch
├── log
│ ├── htmlLogGenerator.py
│ └── log.xsl
└── painter
│ ├── painter.py
│ └── painter使用手册.docx
├── doc
├── Appecker FAQ.doc
├── Appecker SDK说明.doc
├── Appecker 宏录制模式使用说明.docx
└── Appecker 集成说明.doc
├── driver
├── eventSynthesize
│ ├── EventDriver.h
│ ├── EventProxy.mm
│ ├── EventSynthesize.mm
│ └── TouchSynthesize.mm
├── locator
│ ├── ATAndConditions.mm
│ ├── ATAttributesCondition.mm
│ ├── ATClassCondition.mm
│ ├── ATCondition.mm
│ ├── ATFrameCondition.mm
│ ├── ATKeywordCondition.mm
│ ├── ATOrConditions.mm
│ ├── ATSubViewDescCondition.mm
│ ├── ATViewQuery.mm
│ └── ATViewQueryHelper.mm
└── uiElements
│ ├── ATButton.mm
│ ├── ATKeyboard.mm
│ ├── ATLabel.mm
│ ├── ATMPMoviePlayerController.mm
│ ├── ATNavigationBar.mm
│ ├── ATPickerView.mm
│ ├── ATScrollView.mm
│ ├── ATSlider.mm
│ ├── ATSwitch.mm
│ ├── ATTableView.mm
│ ├── ATTableViewCell.mm
│ ├── ATTextField.mm
│ ├── ATTextView.mm
│ ├── ATUICommon.h
│ ├── ATUICommon.m
│ ├── ATViewDebug.mm
│ ├── ATViewDispatching.mm
│ ├── ATViewEventFactory.mm
│ ├── ATViewGestures.mm
│ ├── ATViewLocator.mm
│ ├── ATViewScrCap.mm
│ ├── ATViewSync.mm
│ ├── ATViewVisible.mm
│ ├── ATWebView.mm
│ ├── ATWindow.mm
│ ├── AppeckerTraceManager.mm
│ ├── VisibleTouch.h
│ ├── VisibleTouch.m
│ └── privateHeader
│ ├── ATUICommon.h
│ ├── ATViewPrivate.h
│ ├── AppeckerTraceManagerPrivate.h
│ └── VisibleTouch.h
├── harness
├── ATAnimationManager.m
├── ATCaseFilter.h
├── ATCaseFilter.mm
├── ATCaseRunner.mm
├── ATCasesAssembler.mm
├── ATException.mm
├── ATExceptionHandler.mm
├── ATJobSummary.mm
├── ATLauncher.mm
├── ATScheduler.mm
├── ATTestCase.mm
├── ATTestClass.mm
└── privateHeader
│ ├── ATAnimationManager.h
│ ├── ATCaseFilter.h
│ ├── ATCaseRunnerPrivate.h
│ └── ATExceptionHandlerPrivate.h
├── hook
├── ATCAAnimationHook.m
├── ATUIApplicationHook.mm
├── AppeckerHookManager.mm
└── privateHeader
│ ├── ATCAAnimationHook.h
│ ├── ATUIApplicationHook.h
│ └── AppeckerHookManager.h
├── inc
└── atf
│ ├── ATFramework.h
│ ├── Appecker
│ └── Appecker.h
│ ├── TestClassProtocol.h
│ ├── elements
│ ├── ATButton.h
│ ├── ATKeyboard.h
│ ├── ATLabel.h
│ ├── ATMPMoviePlayerController.h
│ ├── ATNavigationBar.h
│ ├── ATPickerView.h
│ ├── ATScrollView.h
│ ├── ATSlider.h
│ ├── ATSwitch.h
│ ├── ATTableView.h
│ ├── ATTableViewCell.h
│ ├── ATTextField.h
│ ├── ATTextView.h
│ ├── ATUIElements.h
│ ├── ATView.h
│ ├── ATWebView.h
│ └── ATWindow.h
│ ├── eventSynthesize
│ ├── EventProxy.h
│ ├── EventSynthesize.h
│ ├── TouchSynthesize.h
│ └── UITouch.h
│ ├── harness
│ ├── ATCaseRunner.h
│ ├── ATCasesAssembler.h
│ ├── ATException.h
│ ├── ATExceptionHandler.h
│ ├── ATJobSummary.h
│ ├── ATLauncher.h
│ ├── ATScheduler.h
│ ├── ATTestCase.h
│ ├── ATTestClass.h
│ └── Harness.h
│ ├── locator
│ ├── ATAndConditions.h
│ ├── ATAttributesCondition.h
│ ├── ATClassCondition.h
│ ├── ATCondition.h
│ ├── ATFrameCondition.h
│ ├── ATKeywordCondition.h
│ ├── ATOrConditions.h
│ ├── ATSubViewDescCondition.h
│ ├── ATViewQuery.h
│ └── Locator.h
│ ├── model
│ ├── ATAction.h
│ ├── ATModel.h
│ ├── ATModelEngine.h
│ ├── ATRandom.h
│ └── model.h
│ └── utilities
│ ├── ATAssert.h
│ ├── ATDispatcher.h
│ ├── ATLogger.h
│ ├── ATRetryHelper.h
│ ├── ATUtilities.h
│ ├── ATWaitUtility.h
│ ├── ATXmlHelper.h
│ ├── AppeckerTraceManager.h
│ └── CaseSelectorParser.h
├── license.txt
├── macroRec
├── ATHTMLAlertView.h
├── ATHTMLAlertView.m
├── ATMacroRec.h
├── ATMacroRec.mm
├── ATMacroRecSwitch.h
├── ATMacroRecSwitch.m
├── ATTextAlertView.h
└── ATTextAlertView.m
├── model
├── ATAction.mm
├── ATModelBase.mm
├── ATModelContainer.mm
├── ATModelEngine.mm
├── ATModelInner.mm
├── ATModelOuter.mm
└── ATRandom.mm
└── utilities
├── ATAnimationDelegateWrapper.m
├── ATAssert.mm
├── ATDispatcher.mm
├── ATLogger.mm
├── ATRetryHelper.mm
├── ATToolkit.mm
├── ATWaitUtility.mm
├── ATXmlHelper.mm
├── AppeckerContextWrapper.mm
├── CaseSelectorParser.mm
├── TouchUtility.mm
└── privateHeader
├── ATAnimationDelegateWrapper.h
├── ATCommonMacro.h
├── ATToolkit.h
├── ATWaitUtilityPrivate.h
├── AppeckerContextWrapper.h
├── CaseSelectorParser.h
└── TouchUtility.h
/Appecker.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Appecker/privateHeader/AppeckerPrivate.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "Appecker.h"
18 |
19 | @interface Appecker(Private)
20 | -(void) didEnterBackground;
21 | -(void) willEnterForeground;
22 | -(BOOL) isBackground;
23 | -(void) onBeginTouch:(UIView*) view;
24 | @end
--------------------------------------------------------------------------------
/Appecker_Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'CocoaTouchStaticLibrary' target in the 'CocoaTouchStaticLibrary' project.
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #import
8 | #endif
9 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/AppeckerCompleteDemo-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIconFile
12 |
13 | CFBundleIdentifier
14 | com.tencent.${PRODUCT_NAME:rfc1034identifier}
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | ${PRODUCT_NAME}
19 | CFBundlePackageType
20 | APPL
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | NSMainNibFile
28 | MainWindow
29 |
30 |
31 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/AppeckerCompleteDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/AppeckerCompleteDemo_Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'ATFCompleteDemo' target in the 'ATFCompleteDemo' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #import
8 | #endif
9 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/ATFramework.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "elements/UIElements.h"
19 | #import "locator/Locator.h"
20 | #import "utilities/Utilities.h"
21 | #import "harness/Harness.h"
22 | #import "model/model.h"
23 | #import "TestClassProtocol.h"
24 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/TestClassProtocol.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @protocol TestClass
20 |
21 | @required
22 |
23 | @optional
24 | -(void)setup;
25 | -(void)teardown;
26 | -(void)setupCase;
27 | -(void)teardownCase;
28 |
29 | +(NSDictionary *)registerCaseInformation;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATButton.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface UIButton (ATButton)
21 |
22 | -(NSString *) atfCurrentTitle;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATKeyboard.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATKeyboard : NSObject {
21 |
22 | }
23 |
24 | +(BOOL) isAvailable;
25 | +(id) keyboard;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATLabel.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UILabel (ATLabel)
20 |
21 | -(NSString *) atfText;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATMPMoviePlayerController.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import
19 |
20 | @interface MPMoviePlayerController (ATMPMoviePlayerController)
21 |
22 | -(NSURL*) getContentURL;
23 | -(BOOL) isControlBarShowing;
24 | -(void) atfStop;
25 | -(void) atfPause;
26 | -(void) atfPlay;
27 | -(void) atfBeginSeekingBackward;
28 | -(void) atfBeginSeekingForward;
29 | -(void) atfEndSeeking;
30 | -(void) clickForward;
31 | -(void) clickBack;
32 | -(void) clickMiddleBtn;
33 | -(void) clickDone;
34 | -(void) clickPause;
35 | -(void) clickPlay;
36 | -(void) setProgress:(NSUInteger) progress;
37 | -(void) showControlBar;
38 | -(void) clickZoomBtn;
39 | @end
40 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATNavigationBar.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UINavigationBar (ATNavigationBar)
20 |
21 | -(void) clickLeftBtn;
22 | -(void) clickRightBtn;
23 | -(void) clickBtnWithIdx:(int) idx;
24 | @end
25 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATPickerView.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UIPickerView (ATPickerView)
20 |
21 | -(void)selectRow:(NSInteger)row inComponent:(NSInteger)component;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATScrollView.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UIScrollView ( ATScrollowView )
20 | -(void) scrollsSubViewVisible:(UITableView*) view;
21 | -(void) scrollToTop;
22 | -(void) scrollToBottom;
23 | -(void) scrollToLeft;
24 | -(void) scrollToRight;
25 | -(void) scrollUp;
26 | -(void) scrollDown;
27 | -(void) scrollLeft;
28 | -(void) scrollRight;
29 | -(void) scrollVertically:(int)offset;
30 | -(void) scrollHorizontally:(int)offset;
31 | @end
32 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATSlider.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UISlider (ATSlider)
20 |
21 | -(void)atfSetValue:(float)value;
22 | @end
23 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATSwitch.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UISwitch (ATSwitch)
20 |
21 | -(void)setStatus:(BOOL)on;
22 | @end
23 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATTableView.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATFramework.h"
19 |
20 | @interface UITableView (ATTableView)
21 |
22 | -(UITableViewCell *)cellAtRowIndex:(NSInteger)rowIndex inSection:(NSInteger)sectionIndex;
23 | -(void)scrollToRowAtIndexPath:(NSInteger)rowIndex inSection:(NSInteger)sectionIndex;
24 | -(void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath;
25 | -(void)deletRowAtIndex:(NSInteger)rowIndex inSection:(NSInteger)sectionIndex;
26 | -(void)scrollToTop;
27 | -(void)scrollToBottom;
28 | -(void)iterateWithObject:(id)target predicate:(SEL) predicate method:(SEL) method localMem:(NSMutableDictionary*) localMem;
29 | -(void)clickCellInRow:(int) row section:(int) section;
30 | @end
31 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATTableViewCell.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UITableViewCell (ATTableViewCell)
20 |
21 | -(void)clickRemoveControlMinusButton;
22 | -(void)clickRemoveControlConfirmButton;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATTextField.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UITextField (ATTextField)
20 |
21 | -(NSString *) atfText;
22 | -(NSString *) atfPlaceHolder;
23 |
24 | -(void)input:(NSString *)text;
25 | -(void)inputAndReturn:(NSString *)text;
26 | @end
27 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATTextView.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface UITextView (ATTextView)
21 |
22 | -(NSString *) atfText;
23 | -(NSString *) atfPlaceHolder;
24 |
25 | -(void)input:(NSString *)text;
26 | -(void)inputCharacters:(NSString *)text;
27 | -(void)simulateReturn;
28 | -(void)commitPSMUpdate;
29 | -(void)commitUpdateByNL;
30 | @end
31 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/ATWindow.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UIWindow (ATWindow )
20 |
21 | + (id)mainWindow;
22 | + (UIActionSheet *)actionSheet;
23 | + (UIAlertView *)alertView;
24 | + (UIActivityIndicatorView *)activityIndicatorWindow;
25 | + (void)printTree;
26 | + (BOOL) tapAlertViewButtonWithTag:(int) tag;
27 |
28 | - (id)subviewController;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/elements/UIElements.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATView.h"
19 | #import "ATWindow.h"
20 | #import "ATLabel.h"
21 | #import "ATButton.h"
22 | #import "ATTextField.h"
23 | #import "ATTextView.h"
24 | #import "ATSlider.h"
25 | #import "ATSwitch.h"
26 | #import "ATTableView.h"
27 | #import "ATTableViewCell.h"
28 | #import "ATScrollView.h"
29 | #import "ATPickerView.h"
30 | #import "ATKeyboard.h"
31 | #import "ATMPMoviePlayerController.h"
32 | #import "ATNavigationBar.h"
33 | #import "ATWebView.h"
34 |
35 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/eventSynthesize/EventProxy.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface GSEventProxy : NSObject
20 | {
21 | @public
22 | int ignored1[5];
23 | float x;
24 | float y;
25 | int ignored2[18];
26 | float x2;
27 | float y2;
28 | int ignored3[4];
29 | }
30 | @end
31 |
32 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/eventSynthesize/EventSynthesize.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "EventProxy.h"
19 |
20 | @interface UIEventInternal : NSObject
21 | {
22 | @public
23 | NSTimeInterval _timestamp;
24 | }
25 | @end
26 |
27 |
28 | @interface UITouchesEventInternal : UIEventInternal
29 | {
30 | GSEventProxy *_gsEvent;
31 | NSMutableSet *_touches;
32 | CFMutableDictionaryRef _keyedTouches;
33 | }
34 |
35 | - (id)initWithTouch:(UITouch *)touch;
36 |
37 | - (id)initWithTouches:(NSSet *)touches;
38 |
39 | @end
40 |
41 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/eventSynthesize/TouchSynthesize.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface UITouch (Synthesize)
21 |
22 | -(id)initInView:(UIView *)view;
23 | -(id)initInView:(UIView *)view withPosition:(CGPoint)pos;
24 | -(id)initInView:(UIView *)view withPosition:(CGPoint)pos withTapCount:(int)tapCount isFirstTouchForView:(BOOL)isFirstTouch;
25 | -(void)changeToPhase: (UITouchPhase)phase;
26 | - (void)setLocationInWindow:(CGPoint)location;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/harness/ATCaseRunner.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATJobSummary.h"
19 | #import "ATTestClass.h"
20 |
21 | @interface ATCaseRunner : NSObject {
22 | ATJobSummary * jobSummary;
23 | }
24 |
25 | @property (nonatomic, readonly) ATJobSummary * jobSummary;
26 |
27 | -(id)init;
28 | -(void)runCases:(NSArray *)cases withTargetClass:(Class) targetClass;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/harness/ATCasesAssembler.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATCasesAssembler : NSObject {
21 | NSMutableDictionary * _testClassSet;
22 | }
23 |
24 | @property (nonatomic, retain, readonly) NSDictionary * testClassSet;
25 |
26 | -(id)init;
27 | -(NSDictionary *)getAllCases;
28 |
29 | +(ATCasesAssembler*)sharedInstance;
30 | +(void)releaseSharedInstance;
31 | +(ATCasesAssembler*)createSharedInstance;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/harness/ATException.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATException : NSObject {
21 | NSMutableString *callStack;
22 | NSString *message;
23 | }
24 | @property (nonatomic, retain) NSString* message;
25 | @property (nonatomic, retain, readonly) NSString * callStack;
26 |
27 | +(id)exceptionWithMessage:(NSString *)msg;
28 | -(id)initWithMessage:(NSString *)message;
29 | @end
30 |
31 | @interface ATValidationException : ATException {
32 |
33 | }
34 |
35 | @end
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/harness/ATLauncher.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface ATLauncher : NSObject {
20 |
21 | }
22 | +(void) setupWithArgs:(char**)argv count:(int) argc;
23 | +(void) tearDown;
24 | +(void) run;
25 | +(NSString *) cmdParam:(NSString *) parameterName;
26 | +(BOOL) isRunningFromCmdLine;
27 | @end
28 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/harness/ATScheduler.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCaseRunner.h"
19 |
20 |
21 | @interface ATScheduler : NSObject {
22 |
23 | }
24 |
25 | +(void) traverse:(ATCaseRunner *)caseRunner;
26 |
27 | @end
28 |
29 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/harness/ATTestClass.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import
19 |
20 | @interface ATTestClass : NSObject {
21 | Class _testClass;
22 | NSString *_testClassDescription;
23 | NSMutableDictionary *_testCases;
24 | }
25 |
26 | @property (nonatomic, assign) Class testClass;
27 | @property (nonatomic, retain) NSString *testClassDescription;
28 | @property (nonatomic, retain, readonly) NSDictionary *testCases;
29 |
30 | +(id)testClassWithType:(Class) testClassType withDescription:(NSString *) description;
31 | -(id)initWithType:(Class)testClassType withDescription:(NSString *)classDescription;
32 | -(void)findAllTestCases;
33 | @end
34 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/harness/Harness.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATLauncher.h"
19 | #import "ATCaseRunner.h"
20 | #import "ATTestCase.h"
21 | #import "ATTestClass.h"
22 | #import "ATCasesAssembler.h"
23 | #import "ATJobSummary.h"
24 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/locator/ATAndConditions.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h"
19 |
20 | @interface ATAndConditions : ATCondition {
21 | NSMutableArray * _andConditions;
22 | }
23 |
24 | @property(nonatomic, readonly) NSArray *andConditions;
25 |
26 | -(id) initWithConditions:(ATCondition *) firstCondition, ...;
27 |
28 | -(void)addCondition:(ATCondition *)condition;
29 | -(void)addConditions:(NSArray *)conditions;
30 |
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/locator/ATAttributesCondition.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h";
19 |
20 | @interface ATAttributesCondition : ATCondition {
21 | NSDictionary * attributeDict;
22 | }
23 |
24 | -(id)initWithArrributeName:(NSString *)attrName attributeValue:(NSString *)attrValue;
25 | -(id)initWithDictionary:(NSDictionary *)attributes;
26 | @end
27 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/locator/ATClassCondition.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h"
19 |
20 | @interface ATClassCondition : ATCondition {
21 | Class classObject;
22 | }
23 |
24 | @property(nonatomic, retain)Class classObject;
25 |
26 | -(id)initWithClassName:(NSString *)clssName;
27 | -(id)initWithClass:(Class)classObj;
28 |
29 | @end
30 |
31 | @interface ATExactClassCondition : ATCondition {
32 | Class classObject;
33 | }
34 |
35 | @property(nonatomic, retain)Class classObject;
36 |
37 | -(id)initWithClassName:(NSString *)clssName;
38 | -(id)initWithClass:(Class)classObj;
39 |
40 | @end
41 |
42 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/locator/ATFrameCondition.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h"
19 |
20 | @interface ATFrameCondition : ATCondition
21 | {
22 | CGRect frame;
23 | int bias;
24 | }
25 |
26 | -(id) initWithFrameRect:(CGRect)frame_a bias:(int) bias_a;
27 |
28 | @end
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/locator/ATKeywordCondition.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h"
19 |
20 |
21 | @interface ATKeywordCondition : ATCondition
22 | {
23 | NSString* attrName;
24 | NSString* keyword;
25 | }
26 |
27 | -(id) initWithAttributeName:(NSString*)attrName_a attrValKeyword:(NSString*) keyword_a;
28 |
29 | @end
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/locator/ATOrConditions.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h"
19 |
20 | @interface ATOrConditions : ATCondition {
21 | NSMutableArray * _orConditions;
22 | }
23 |
24 | @property(nonatomic, retain, readonly) NSArray *orConditions;
25 |
26 | -(id) initWithConditions:(ATCondition *) firstCondition, ...;
27 |
28 | -(void)addCondition:(ATCondition *)condition;
29 | -(void)addConditions:(NSArray *)conditions;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/locator/ATSubViewDescCondition.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h"
19 |
20 | @interface ATSubViewDescCondition : ATCondition
21 | {
22 | NSString *rootViewClassName;
23 | NSMutableDictionary* subviewInfo;
24 | }
25 |
26 | -(id) initWithStringDesc:(NSString*) desc;
27 | -(void) dealloc;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/locator/Locator.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATViewQuery.h"
19 | #import "ATCondition.h"
20 | #import "ATClassCondition.h"
21 | #import "ATAttributesCondition.h"
22 | #import "ATOrConditions.h"
23 | #import "ATAndConditions.h"
24 | #import "ATFrameCondition.h"
25 | #import "ATSubViewDescCondition.h"
26 | #import "ATKeywordCondition.h"
27 |
28 |
29 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/model/ATRandom.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATRandom : NSObject {
21 | unsigned _seed;
22 | unsigned nextSeed;
23 | }
24 | @property (nonatomic) unsigned seed;
25 |
26 | -(id)initWithSeed:(unsigned) seed;
27 | -(int) getNext;
28 | -(int) getNextBetween:(int)min andBetween:(int)max;
29 | -(int) getNextInteger:(int)boundary;
30 |
31 | +(int) randomBetween:(int)min Max:(int)max Seed:(unsigned)seed;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/model/model.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATModel.h"
19 | #import "ATModelEngine.h"
20 | #import "ATRandom.h"
21 | #import "ATAction.h"
22 |
23 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/utilities/ATAssert.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | void ATCaptureScreen();
18 | void ATFail(NSString * message);
19 | void ATFailIf(BOOL predication, NSString * message);
20 | void ATFailFormat(NSString * format,...);
21 | void ATFailFormatIf(BOOL predication, NSString * format,...);
22 |
23 | void ATWarnIf(BOOL predication, NSString * message);
24 | void ATWarnFormatIf(BOOL predication, NSString * format,...);
25 |
26 | void ATMessageIf(BOOL predication, NSString * message);
27 | void ATMessageFormatIf(BOOL predication, NSString * format,...);
28 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/utilities/ATDispatcher.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATDispatcher : NSObject {
21 | id _target;
22 | bool _retainTarget;
23 | }
24 |
25 | +(id) dispatcherWithTarget:(id)target;
26 |
27 | -(id) initWithTarget:(id)target;
28 | -(id) initWithTarget:(id)target retainTarget:(BOOL)retainTarget;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/utilities/ATRetryHelper.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATRetryHelper : NSObject {
21 |
22 | }
23 |
24 | +(BOOL) tryTaskWithSelector:(SEL) taskSelector target:aTarget quitAfter:(NSTimeInterval) interval;
25 | +(BOOL) tryTaskWithSelector:(SEL) taskSelector target:aTarget quitAfter:(NSTimeInterval) interval expecting:(BOOL) expectedResult;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/utilities/ATXmlHelper.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATXmlHelper : NSObject {
21 |
22 | }
23 | +(NSString *) escape:(NSString *)input;
24 | @end
25 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Atf/Header/utilities/Utilities.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATLogger.h"
19 | #import "CaseSelectorParser.h"
20 | #import "ATXmlHelper.h"
21 | #import "ATDispatcher.h"
22 | #import "ATRetryHelper.h"
23 | #import "ATAssert.h"
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Classes/ATFCompleteDemoAppDelegate.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface ATFCompleteDemoAppDelegate : NSObject {
20 | UIWindow *window;
21 | UINavigationController* navController;
22 | }
23 |
24 | @property (nonatomic, retain) IBOutlet UIWindow *window;
25 | @property (nonatomic, retain) IBOutlet UINavigationController* navController;
26 |
27 | @end
28 |
29 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Classes/BasicViewController.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "SubController.h"
18 |
19 |
20 | @interface BasicViewController : SubController {
21 | NSArray* m_pickerData;
22 | UIPickerView* picker;
23 |
24 | }
25 |
26 | @property (nonatomic, retain) IBOutlet UIPickerView* picker;
27 | @end
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Classes/MoveScaleImageView.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface MoveScaleImageView : UIImageView
21 | {
22 | }
23 | @end
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Classes/PinchViewController.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "MoveScaleImageView.h"
19 |
20 |
21 | @interface PinchViewController : UIViewController {
22 | MoveScaleImageView* m_imageView;
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Classes/PinchViewController.m:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "PinchViewController.h"
18 |
19 |
20 | @implementation PinchViewController
21 |
22 | -(void) viewDidLoad
23 | {
24 | UIImage* image = [UIImage imageNamed:@"demo.bmp"];
25 | m_imageView = [[MoveScaleImageView alloc] initWithImage:image];
26 | [self.view addSubview:m_imageView];
27 | }
28 |
29 | -(void) viewDidUnload
30 | {
31 | [m_imageView release];
32 | }
33 |
34 | -(void) dealloc
35 | {
36 | [m_imageView release];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Classes/RootController.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "SubController.h"
19 |
20 | @interface RootController : UITableViewController {
21 | NSMutableArray* m_controllers;
22 | NSArray* m_listData;
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Classes/SubController.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface SubController : UIViewController {
21 |
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Classes/SubController.m:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "SubController.h"
18 |
19 |
20 | @implementation SubController
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Classes/WebViewController.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface WebViewController : UIViewController {
21 | UIWebView* webView;
22 | }
23 |
24 | @property (nonatomic, retain) IBOutlet UIWebView* webView;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Classes/WipeViewController.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "SubController.h"
19 |
20 | @interface WipeViewController : SubController {
21 | UIScrollView* scrollView;
22 | }
23 |
24 | @property (nonatomic, retain) IBOutlet UIScrollView* scrollView;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Testcases/MyTestCases.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATFramework.h"
19 |
20 | @interface MyTestCases : NSObject {
21 |
22 | }
23 |
24 | -(void) testcase_allInOne;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/Wipe.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/demo.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/DemoProject/AppeckerCompleteDemo/demo.bmp
--------------------------------------------------------------------------------
/DemoProject/AppeckerCompleteDemo/main.mm:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | #import "Appecker.h"
20 |
21 | int main(int argc, char *argv[]) {
22 |
23 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
24 | //[[Appecker sharedInstance] enableMacroRecMode];
25 | int retVal = UIApplicationMain(argc, argv, nil, nil);
26 | [pool release];
27 | return retVal;
28 | }
29 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 什么是Appecker?
2 | ------------------------------------------
3 |
4 | Appecker是一款专门为 i0S系统系统定制的的自动化测试框架
5 | v1.0.0版本仅对i0S6.0 , 7.0 32位提供支持。
6 |
7 |
8 | 如何使用?
9 | ------------------------------------------
10 | 可以从代码目录的DemoProject开始学习该组件
11 |
12 | 相关文档保存在文件夹doc中
13 |
14 | 可以参考文档《Appecker 集成说明.doc》
15 | 如果需要使用更多SKD,请参考《Appecker SDK说明.doc》
16 |
17 |
18 | 其他事项
19 | ------------------------------------------
20 |
21 | 更多细节可以参考文件夹doc中附带的文档。
22 |
--------------------------------------------------------------------------------
/Tool/AppeckerControl/Tool/Appid2name.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/Tool/AppeckerControl/Tool/Appid2name.dylib
--------------------------------------------------------------------------------
/Tool/AppeckerControl/Tool/Appid2name.plist:
--------------------------------------------------------------------------------
1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; }
2 |
--------------------------------------------------------------------------------
/Tool/AppeckerControl/Tool/Open.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/Tool/AppeckerControl/Tool/Open.dylib
--------------------------------------------------------------------------------
/Tool/AppeckerControl/Tool/Open.plist:
--------------------------------------------------------------------------------
1 | Filter = {Bundles = ("com.apple.springboard");};
2 |
--------------------------------------------------------------------------------
/Tool/AppeckerControl/Tool/appid2name:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/Tool/AppeckerControl/Tool/appid2name
--------------------------------------------------------------------------------
/Tool/AppeckerControl/Tool/argopen:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/Tool/AppeckerControl/Tool/argopen
--------------------------------------------------------------------------------
/Tool/appid2name/Appid2name.plist:
--------------------------------------------------------------------------------
1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; }
2 |
--------------------------------------------------------------------------------
/Tool/appid2name/Makefile:
--------------------------------------------------------------------------------
1 | include theos/makefiles/common.mk
2 |
3 | TOOL_NAME = appid2name
4 | appid2name_FILES = appid2name.m
5 | appid2name_PRIVATE_FRAMEWORKS = AppSupport
6 |
7 | TWEAK_NAME = Appid2name
8 | Appid2name_FILES = Tweak.xm
9 | Appid2name_FRAMEWORKS = UIKit
10 | Appid2name_PRIVATE_FRAMEWORKS = AppSupport
11 |
12 | include $(THEOS_MAKE_PATH)/tool.mk
13 | include $(THEOS_MAKE_PATH)/tweak.mk
14 |
--------------------------------------------------------------------------------
/Tool/appid2name/Tweak.xm:
--------------------------------------------------------------------------------
1 | /* How to Hook with Logos
2 | Hooks are written with syntax similar to that of an Objective-C @implementation.
3 | You don't need to #include , it will be done automatically, as will
4 | the generation of a class list and an automatic constructor. */
5 |
6 | #import
7 |
8 | %hook SBApplicationController
9 |
10 | - (id)init {
11 | if ((self = %orig)) {
12 | NSLog(@"msmsms: appid2name hooked!");
13 | CPDistributedMessagingCenter *messagingCenter = [CPDistributedMessagingCenter centerNamed:@"com.williammu.appid2name.server"];
14 | [messagingCenter runServerOnCurrentThread];
15 | [messagingCenter registerForMessageName:@"appid2name" target:self selector:@selector(handleAppid2nameCommand:withUserInfo:)];
16 | }
17 | return self;
18 | }
19 |
20 | %new(@@:@@)
21 | - (NSDictionary *)handleAppid2nameCommand:(NSString *)name withUserInfo:(NSDictionary *)userInfo {
22 | NSLog(@"msmsms: handleAppid2nameCommand");
23 | NSString *identifier = [userInfo objectForKey:@"identifier"];
24 | SBApplication *application = [self applicationWithDisplayIdentifier:identifier];
25 | NSMutableDictionary* result = [[[NSMutableDictionary alloc] init] autorelease];
26 |
27 | if(!application)
28 | return result;
29 |
30 | NSString* path = [application path];
31 |
32 | [result setObject:path forKey:@"appPath"];
33 |
34 | return result;
35 | }
36 |
37 | %end
38 |
--------------------------------------------------------------------------------
/Tool/appid2name/appid2name.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import
4 |
5 |
6 | NSString* appNameFromPath( NSString* path ){
7 | NSCharacterSet* pathSeparator = [NSCharacterSet characterSetWithCharactersInString:@"/"];
8 | NSArray* aryPath = [path componentsSeparatedByCharactersInSet:pathSeparator];
9 |
10 |
11 | NSString* fullName = [aryPath lastObject];
12 |
13 | NSCharacterSet* dot = [NSCharacterSet characterSetWithCharactersInString:@"."];
14 | NSArray* aryFullName = [fullName componentsSeparatedByCharactersInSet:dot];
15 |
16 | NSString* appName = [aryFullName objectAtIndex:0];
17 | return appName;
18 | }
19 |
20 | int main(int argc, char **argv, char **envp) {
21 | if(!argv[1]){
22 | fprintf(stderr, "Usage: appid2name com.yourcompany.appid\n");
23 | return 1;
24 | }
25 |
26 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
27 |
28 | NSString *identifier = [NSString stringWithUTF8String:argv[1]];
29 |
30 | NSDictionary* userInfo = [NSDictionary dictionaryWithObject:identifier forKey:@"identifier"];
31 |
32 | CPDistributedMessagingCenter *messagingCenter = [CPDistributedMessagingCenter centerNamed:@"com.williammu.appid2name.server"];
33 | NSDictionary *status = [messagingCenter sendMessageAndReceiveReplyName:@"appid2name" userInfo:userInfo];
34 |
35 | NSString* appPath = [status objectForKey:@"appPath"];
36 |
37 | if(!appPath)
38 | return 1;
39 |
40 | NSString* appName = appNameFromPath(appPath);
41 |
42 | printf("%s\n", [appName UTF8String]);
43 |
44 | [pool release];
45 |
46 | return 0;
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/Tool/appid2name/control:
--------------------------------------------------------------------------------
1 | Package: com.tencent.appid2name
2 | Name: appid2name
3 | Depends: mobilesubstrate
4 | Version: 0.0.1
5 | Architecture: iphoneos-arm
6 | Description: An awesome MobileSubstrate tweak!
7 | Maintainer: mu william
8 | Author: mu william
9 | Section: Tweaks
10 |
--------------------------------------------------------------------------------
/Tool/appid2name/readyMade/Appid2name.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/Tool/appid2name/readyMade/Appid2name.dylib
--------------------------------------------------------------------------------
/Tool/appid2name/readyMade/Appid2name.plist:
--------------------------------------------------------------------------------
1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; }
2 |
--------------------------------------------------------------------------------
/Tool/appid2name/readyMade/appid2name:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/Tool/appid2name/readyMade/appid2name
--------------------------------------------------------------------------------
/Tool/arg-Open/Makefile:
--------------------------------------------------------------------------------
1 | include theos/makefiles/common.mk
2 |
3 | TOOL_NAME = open
4 | open_FILES = open.m
5 | open_PRIVATE_FRAMEWORKS = AppSupport
6 |
7 | TWEAK_NAME = Open
8 | Open_FILES = Tweak.xm
9 | Open_LDFLAGS = -ldisplaystack
10 | Open_FRAMEWORKS = UIKit
11 | Open_PRIVATE_FRAMEWORKS = AppSupport
12 |
13 | include $(THEOS_MAKE_PATH)/tool.mk
14 | include $(THEOS_MAKE_PATH)/tweak.mk
15 |
16 |
--------------------------------------------------------------------------------
/Tool/arg-Open/Open.plist:
--------------------------------------------------------------------------------
1 | Filter = {Bundles = ("com.apple.springboard");};
2 |
--------------------------------------------------------------------------------
/Tool/arg-Open/README:
--------------------------------------------------------------------------------
1 | Opens apps from the commandline
2 |
--------------------------------------------------------------------------------
/Tool/arg-Open/control:
--------------------------------------------------------------------------------
1 | Package: com.conradkramer.open
2 | Name: Open
3 | Depends: com.zimm.libdisplaystack, mobilesubstrate
4 | Version: 1.0
5 | Architecture: iphoneos-arm
6 | Description: Opens applications from the commandline.
7 | Maintainer: Conrad Kramer
8 | Author: Conrad Kramer
9 | Section: System
10 | Tag: role::hacker, purpose::extension
11 |
--------------------------------------------------------------------------------
/Tool/arg-Open/readyMade/Open.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/Tool/arg-Open/readyMade/Open.dylib
--------------------------------------------------------------------------------
/Tool/arg-Open/readyMade/Open.plist:
--------------------------------------------------------------------------------
1 | Filter = {Bundles = ("com.apple.springboard");};
2 |
--------------------------------------------------------------------------------
/Tool/arg-Open/readyMade/argopen:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/Tool/arg-Open/readyMade/argopen
--------------------------------------------------------------------------------
/Tool/autorun/ios-sim:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/Tool/autorun/ios-sim
--------------------------------------------------------------------------------
/Tool/converter/convert.py:
--------------------------------------------------------------------------------
1 | import os
2 | import re
3 |
4 | def writeLine(fs, line):
5 | print "write: %s"%line
6 | fs.write(line)
7 |
8 | def fixFile(filePath):
9 | fs = open(filePath, "r")
10 | lines = fs.readlines()
11 | fs.close()
12 |
13 | fs = open(filePath, "w")
14 | for line in lines:
15 | result = re.search(r"(?<=\[NSThread\ssleepForTimeInterval:).*(?=\])", line)
16 | if not result:
17 | writeLine(fs, line)
18 | continue
19 |
20 | if line.startswith("\\\\"):
21 | writeLine(fs, line)
22 | continue
23 |
24 | time = result.group(0)
25 | indent = re.search(r"^\s*", line).group(0)
26 | newLine = indent + "AppeckerWait(" + time + ");";
27 | writeLine(fs, newLine)
28 | fs.close()
29 |
30 | def onFileDetected( arg, dirname, names ):
31 | for name in names:
32 | if re.search(r'\.mm$', name.lower()):
33 | fixFile(dirname + '/' + name)
34 |
35 |
36 | os.path.walk(".", onFileDetected, ())
37 |
--------------------------------------------------------------------------------
/Tool/ios-sim/Fingertips-ios-sim/LICENSE:
--------------------------------------------------------------------------------
1 | Author: Landon Fuller
2 | Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc.
3 | All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person
6 | obtaining a copy of this software and associated documentation
7 | files (the "Software"), to deal in the Software without
8 | restriction, including without limitation the rights to use,
9 | copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the
11 | Software is furnished to do so, subject to the following
12 | conditions:
13 |
14 | The above copyright notice and this permission notice shall be
15 | included in all copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 | OTHER DEALINGS IN THE SOFTWARE.
25 |
26 | Modifications made by the following entities are licensed as above:
27 | - Jeff Haynie, Appcelerator, Inc.
28 | - https://github.com/hborders
29 | - http://pivotallabs.com/users/scoward/blog
30 | - Eloy Duran, Fingertips
31 |
--------------------------------------------------------------------------------
/Tool/ios-sim/Fingertips-ios-sim/README.md:
--------------------------------------------------------------------------------
1 | ios-sim
2 | =======
3 |
4 | The ios-sim tool is a command-line utility that launches an iOS application on
5 | the iOS Simulator. This allows for niceties such as automated testing without
6 | having to open XCode.
7 |
8 | Features
9 | --------
10 |
11 | * Choose the device family to simulate, i.e. iPhone or iPad.
12 | * Setup environment variables.
13 | * Pass arguments to the application.
14 | * See the stdout and stderr, or redirect them to files.
15 |
16 | See the `--help` option for more info.
17 |
18 | Installation
19 | ------------
20 |
21 | Through homebrew:
22 |
23 | $ brew install ios-sim
24 |
25 | Download an archive:
26 |
27 | $ curl -L https://github.com/Fingertips/ios-sim/zipball/1.3 -o ios-sim-1.3.zip
28 | $ unzip ios-sim-1.3.zip
29 |
30 | Or from a git clone:
31 |
32 | $ git clone git://github.com/Fingertips/ios-sim.git
33 |
34 | Then build and install from the source root:
35 |
36 | $ rake install prefix=/usr/local/
37 |
38 | License
39 | -------
40 |
41 | Original author: Landon Fuller
42 | Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc.
43 | All rights reserved.
44 |
45 | This project is available under the MIT license. See [LICENSE][license].
46 |
47 | [license]: https://github.com/Fingertips/ios-sim/blob/master/LICENSE
48 |
--------------------------------------------------------------------------------
/Tool/ios-sim/Fingertips-ios-sim/README.template.md:
--------------------------------------------------------------------------------
1 | ios-sim
2 | =======
3 |
4 | The ios-sim tool is a command-line utility that launches an iOS application on
5 | the iOS Simulator. This allows for niceties such as automated testing without
6 | having to open XCode.
7 |
8 | Features
9 | --------
10 |
11 | * Choose the device family to simulate, i.e. iPhone or iPad.
12 | * Setup environment variables.
13 | * Pass arguments to the application.
14 | * See the stdout and stderr, or redirect them to files.
15 |
16 | See the `--help` option for more info.
17 |
18 | Installation
19 | ------------
20 |
21 | Through homebrew:
22 |
23 | $ brew install ios-sim
24 |
25 | Download an archive:
26 |
27 | $ curl -L https://github.com/Fingertips/ios-sim/zipball/{{VERSION}} -o ios-sim-{{VERSION}}.zip
28 | $ unzip ios-sim-{{VERSION}}.zip
29 |
30 | Or from a git clone:
31 |
32 | $ git clone git://github.com/Fingertips/ios-sim.git
33 |
34 | Then build and install from the source root:
35 |
36 | $ rake install prefix=/usr/local/
37 |
38 | License
39 | -------
40 |
41 | Original author: Landon Fuller
42 | Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc.
43 | All rights reserved.
44 |
45 | This project is available under the MIT license. See [LICENSE][license].
46 |
47 | [license]: https://github.com/Fingertips/ios-sim/blob/master/LICENSE
48 |
--------------------------------------------------------------------------------
/Tool/ios-sim/Fingertips-ios-sim/Source/.gitignore:
--------------------------------------------------------------------------------
1 | *.o
2 |
--------------------------------------------------------------------------------
/Tool/ios-sim/Fingertips-ios-sim/Source/NSString+expandPath.h:
--------------------------------------------------------------------------------
1 | /*
2 | * See the LICENSE file for the license on the source code in this file.
3 | */
4 |
5 | #import
6 |
7 | @interface NSString (ExpandPath)
8 |
9 | - (NSString *)expandPath;
10 |
11 | @end
12 |
--------------------------------------------------------------------------------
/Tool/ios-sim/Fingertips-ios-sim/Source/NSString+expandPath.m:
--------------------------------------------------------------------------------
1 | /*
2 | * See the LICENSE file for the license on the source code in this file.
3 | */
4 |
5 | #import "NSString+expandPath.h"
6 |
7 | @implementation NSString (ExpandPath)
8 |
9 | - (NSString *)expandPath {
10 | if ([self isAbsolutePath]) {
11 | return [self stringByStandardizingPath];
12 | } else {
13 | NSString *cwd = [[NSFileManager defaultManager] currentDirectoryPath];
14 | return [[cwd stringByAppendingPathComponent:self] stringByStandardizingPath];
15 | }
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Tool/ios-sim/Fingertips-ios-sim/Source/iPhoneSimulator.h:
--------------------------------------------------------------------------------
1 | /* Author: Landon Fuller
2 | * Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc.
3 | * All rights reserved.
4 | *
5 | * See the LICENSE file for the license on the source code in this file.
6 | */
7 |
8 | #import
9 | #import
10 | #import "version.h"
11 |
12 | @interface iPhoneSimulator : NSObject {
13 | @private
14 | DTiPhoneSimulatorSystemRoot *sdkRoot;
15 | BOOL exitOnStartup;
16 | BOOL verbose;
17 | BOOL alreadyPrintedData;
18 | }
19 |
20 | - (void)runWithArgc:(int)argc argv:(char **)argv;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Tool/ios-sim/Fingertips-ios-sim/Source/main.m:
--------------------------------------------------------------------------------
1 | /* Author: Landon Fuller
2 | * Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc.
3 | * All rights reserved.
4 | *
5 | * See the LICENSE file for the license on the source code in this file.
6 | */
7 |
8 | #import
9 |
10 | #import "iPhoneSimulator.h"
11 |
12 | /*
13 | * Runs the iPhoneSimulator backed by a main runloop.
14 | */
15 | int main (int argc, char *argv[]) {
16 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
17 | iPhoneSimulator *sim = [[iPhoneSimulator alloc] init];
18 |
19 | /* Execute command line handler */
20 | [sim runWithArgc: argc argv: argv];
21 |
22 | /* Run the loop to handle added input sources, if any */
23 | [[NSRunLoop mainRunLoop] run];
24 |
25 | [pool release];
26 | return 0;
27 | }
28 |
--------------------------------------------------------------------------------
/Tool/ios-sim/Fingertips-ios-sim/Source/nsprintf.h:
--------------------------------------------------------------------------------
1 | int nsvfprintf (FILE *stream, NSString *format, va_list args);
2 | int nsfprintf (FILE *stream, NSString *format, ...);
3 | int nsprintf (NSString *format, ...);
4 |
--------------------------------------------------------------------------------
/Tool/ios-sim/Fingertips-ios-sim/Source/nsprintf.m:
--------------------------------------------------------------------------------
1 | /*
2 | * NSLog() clone, but writes to arbitrary output stream
3 | */
4 |
5 | #import
6 | #import
7 |
8 | int nsvfprintf (FILE *stream, NSString *format, va_list args) {
9 | int retval;
10 |
11 | NSString *str = (NSString *) CFStringCreateWithFormatAndArguments(NULL, NULL, (CFStringRef) format, args);
12 | retval = fprintf(stream, "[DEBUG] %s\n", [str UTF8String]);
13 | [str release];
14 |
15 | return retval;
16 | }
17 |
18 | int nsfprintf (FILE *stream, NSString *format, ...) {
19 | va_list ap;
20 | int retval;
21 |
22 | va_start(ap, format);
23 | {
24 | retval = nsvfprintf(stream, format, ap);
25 | }
26 | va_end(ap);
27 |
28 | return retval;
29 | }
30 |
31 | int nsprintf (NSString *format, ...) {
32 | va_list ap;
33 | int retval;
34 |
35 | va_start(ap, format);
36 | {
37 | retval = nsvfprintf(stderr, format, ap);
38 | }
39 | va_end(ap);
40 |
41 | return retval;
42 | }
43 |
--------------------------------------------------------------------------------
/Tool/ios-sim/Fingertips-ios-sim/Source/version.h:
--------------------------------------------------------------------------------
1 | #define IOS_SIM_VERSION "1.3"
--------------------------------------------------------------------------------
/Tool/ios-sim/Fingertips-ios-sim/ios-sim.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Tool/ios-sim/Fingertips-ios-sim/ios-sim_Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'iphonesim' target in the 'iphonesim' project.
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #endif
8 |
--------------------------------------------------------------------------------
/Tool/painter/painter使用手册.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/Tool/painter/painter使用手册.docx
--------------------------------------------------------------------------------
/doc/Appecker FAQ.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/doc/Appecker FAQ.doc
--------------------------------------------------------------------------------
/doc/Appecker SDK说明.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/doc/Appecker SDK说明.doc
--------------------------------------------------------------------------------
/doc/Appecker 宏录制模式使用说明.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/doc/Appecker 宏录制模式使用说明.docx
--------------------------------------------------------------------------------
/doc/Appecker 集成说明.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TencentOpen/Appecker/d29a43c6ca89562872e044b2104c1bd5a595f1b6/doc/Appecker 集成说明.doc
--------------------------------------------------------------------------------
/driver/eventSynthesize/EventDriver.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "EventSynthesize.h"
19 | #import "TouchSynthesize.h";
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/driver/eventSynthesize/EventProxy.mm:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "EventProxy.h"
18 |
19 |
20 | @implementation GSEventProxy
21 |
22 | @end
23 |
24 |
--------------------------------------------------------------------------------
/driver/uiElements/ATButton.mm:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "ATButton.h"
18 | #import "ATDispatcher.h"
19 |
20 | @implementation UIButton (ATButton)
21 | -(NSString *) atfCurrentTitle
22 | {
23 | NSString * title = [self currentTitle];
24 | return title;
25 | }
26 | @end
27 |
28 |
29 |
--------------------------------------------------------------------------------
/driver/uiElements/ATLabel.mm:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "ATLabel.h"
18 |
19 | @implementation UILabel (ATLabel)
20 | -(NSString *) atfText
21 | {
22 | NSString * title = [self text];
23 | return title;
24 | }
25 | @end
26 |
27 |
--------------------------------------------------------------------------------
/driver/uiElements/ATSlider.mm:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "ATSlider.h"
18 | #import "ATUICommon.h"
19 |
20 |
21 | @implementation UISlider (ATSlider)
22 |
23 |
24 | -(void)atfSetValue:(float)value
25 | {
26 | [self setSlideValue:[NSNumber numberWithFloat:value]];
27 | }
28 |
29 | -(void)setSlideValue:(NSNumber *)value
30 | {
31 | [self setValue:[value floatValue] animated:YES];
32 |
33 | [self atfActivateEvent:UIControlEventValueChanged];
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/driver/uiElements/ATSwitch.mm:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "ATSwitch.h"
18 | #import "ATUICommon.h"
19 | #import "ATWaitUtility.h"
20 |
21 |
22 | @implementation UISwitch (ATSwitch)
23 |
24 | -(void)setStatus:(BOOL)on
25 | {
26 |
27 | if(on)
28 | {
29 | [self setOn];
30 | }
31 | else
32 | {
33 | [self setOff];
34 | }
35 | }
36 |
37 | -(void)commitChange
38 | {
39 | AppeckerWait(0.5);
40 | [self atfActivateEvent:UIControlEventValueChanged];
41 | }
42 |
43 | -(void)setOn
44 | {
45 | [self setOn:YES animated:YES];
46 | [self commitChange];
47 | }
48 |
49 | -(void)setOff
50 | {
51 | [self setOn:NO animated:YES];
52 | [self commitChange];
53 | }
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/driver/uiElements/ATTableViewCell.mm:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "ATTableViewCell.h"
18 | #import "ATView.h"
19 |
20 | @implementation UITableViewCell (ATTableViewCell)
21 |
22 | -(void)clickRemoveControlMinusButton
23 | {
24 | UIView * btn = [self LocateViewByClassName:@"UITableViewCellEditControl"];
25 | [btn click];
26 | }
27 |
28 | -(void)clickRemoveControlConfirmButton
29 | {
30 | UIView * btn = [self LocateViewByClassName:@"UITableViewCellDeleteConfirmationControl"];
31 | [btn click];
32 | }
33 |
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/driver/uiElements/ATUICommon.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UIView (ATUICcommon)
20 |
21 | -(void) atfActivateEvent:(UIControlEvents) event;
22 | @end
23 |
--------------------------------------------------------------------------------
/driver/uiElements/ATViewDispatching.mm:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "ATView.h"
18 |
19 |
20 | @implementation UIView (ATViewDispatching)
21 |
22 | -(id) atfGetAttrVal:(NSString * )attrName
23 | {
24 | SEL sel = NSSelectorFromString(attrName);
25 | id v = [self performSelector:sel];
26 | return v;
27 |
28 | }
29 | @end
30 |
--------------------------------------------------------------------------------
/driver/uiElements/VisibleTouch.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface VisibleTouch : UIView
20 | {
21 | UITouch* m_touch;
22 | }
23 |
24 | // Designated Initializer all others throw exceptions =)
25 | - (id)initWithView:(UIView*) view andPos:(CGPoint) posInView;
26 | - (id)initWithTouch:(UITouch*) touch;
27 | - (id)updatePosition;
28 | - (id)show;
29 | - (id)disappear;
30 | @end
--------------------------------------------------------------------------------
/driver/uiElements/privateHeader/ATUICommon.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UIView (ATUICcommon)
20 |
21 | -(void) atfActivateEvent:(UIControlEvents) event;
22 | @end
23 |
--------------------------------------------------------------------------------
/driver/uiElements/privateHeader/ATViewPrivate.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "ATView.h"
18 |
19 | @interface UIView(Private)
20 | -(CGPoint) atfGetCenter;
21 | -(UIWindow*) atfWindow;
22 | @end
23 |
--------------------------------------------------------------------------------
/driver/uiElements/privateHeader/AppeckerTraceManagerPrivate.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "AppeckerTraceManager.h"
18 |
19 | @interface AppeckerTraceManager(Private)
20 | -(void) onBeginTouch:(UIView*) view;
21 | -(void) incTotalScrCapCounter;
22 | @end
--------------------------------------------------------------------------------
/driver/uiElements/privateHeader/VisibleTouch.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface VisibleTouch : UIView
20 | {
21 | UITouch* m_touch;
22 | }
23 |
24 | // Designated Initializer all others throw exceptions =)
25 | - (id)initWithView:(UIView*) view andPos:(CGPoint) posInView;
26 | - (id)initWithTouch:(UITouch*) touch;
27 | - (id)updatePosition;
28 | - (id)show;
29 | - (id)disappear;
30 | @end
--------------------------------------------------------------------------------
/harness/ATCaseFilter.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATCaseFilter : NSObject {
21 | NSString * _caseFilter;
22 | NSArray * _classFilters;
23 | }
24 |
25 | -(id) initWithCaseFilter:(NSString *) caseFilter classFilter:(NSString *) classFilter;
26 | -(BOOL) isClassMatches:(NSString *) className;
27 | -(BOOL) isCaseMatches:(NSString *) caseName;
28 | @end
29 |
--------------------------------------------------------------------------------
/harness/privateHeader/ATAnimationManager.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCommonMacro.h"
19 | #import
20 | #import "ATLogger.h"
21 |
22 | @interface ATAnimationManager : NSObject
23 | {
24 | int m_animationCounter;
25 | #ifdef APPECKER_TRACE
26 | NSMutableSet* m_animationSet;
27 | #endif
28 | }
29 |
30 | Appecker_DECLARE_AS_SINGLETON(ATAnimationManager);
31 |
32 | -(BOOL) isAllAnimationFinished;
33 | -(void) onAnimationStop:(CAAnimation*) theAnimation finished:(BOOL) flag;
34 | -(void) onAnimationStart:(CAAnimation*) theAnimation;
35 | -(BOOL) isAnimationOK:(CAAnimation*) theAnimation;
36 | @end
37 |
--------------------------------------------------------------------------------
/harness/privateHeader/ATCaseFilter.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATCaseFilter : NSObject {
21 | NSString * _caseFilter;
22 | NSArray * _classFilters;
23 | }
24 |
25 | -(id) initWithCaseFilter:(NSString *) caseFilter classFilter:(NSString *) classFilter;
26 | -(BOOL) isClassMatches:(NSString *) className;
27 | -(BOOL) isCaseMatches:(NSString *) caseName;
28 | @end
29 |
--------------------------------------------------------------------------------
/harness/privateHeader/ATCaseRunnerPrivate.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "ATCaseRunner.h"
18 |
19 | @interface ATCaseRunner(Private)
20 | +(void) DoCleanUp;
21 | +(void) TearDownCurCase;
22 | @end
23 |
--------------------------------------------------------------------------------
/harness/privateHeader/ATExceptionHandlerPrivate.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "ATExceptionHandler.h"
18 |
19 | @interface ATExceptionHandler(Private)
20 | -(void) setupStrongErrorHandling;
21 | -(void) tearDownStrongErrorHandling;
22 | -(void) messCleaner;
23 | -(id) init;
24 | -(void) setNeedsTeardown:(BOOL) b;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/hook/ATCAAnimationHook.m:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "ATCAAnimationHook.h"
18 | #import "AppeckerHookManager.h"
19 | #import "ATAnimationDelegateWrapper.h"
20 |
21 | @implementation CAAnimation (ATCAAnimationHook)
22 |
23 |
24 | +(void) load
25 | {
26 | if(self != [CAAnimation class])
27 | return;
28 |
29 | [AppeckerHookManager hijackInstanceSelector:@selector(setDelegate:) inClass:[self class] withSelector:@selector(atfSetDelegate:) inClass:[self class]];
30 | }
31 |
32 |
33 | -(void) atfSetDelegate:(id) delegate
34 | {
35 | if(!delegate){
36 | NSLog(@"delegate is set to nil!");
37 | return;
38 | }
39 |
40 | ATAnimationDelegateWrapper* wrapper = [[ATAnimationDelegateWrapper alloc] initWithDelegate:delegate];
41 | [self atfSetDelegate:wrapper];
42 | [wrapper release];
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/hook/privateHeader/ATCAAnimationHook.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import
19 |
20 | @interface CAAnimation (ATCAAnimationHook)
21 | +(void) load;
22 | -(void) atfSetDelegate:(id) delegate;
23 | @end
24 |
--------------------------------------------------------------------------------
/hook/privateHeader/ATUIApplicationHook.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UIApplication (ATUIApplicationHook)
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/hook/privateHeader/AppeckerHookManager.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface AppeckerHookManager : NSObject
20 |
21 | + (void)hijackClassSelector:(SEL)originalSelector inClass:(Class) srcCls withSelector:(SEL)newSelector inClass:(Class) dstCls;
22 | + (void)hijackInstanceSelector:(SEL)originalSelector inClass:(Class) srcCls withSelector:(SEL)newSelector inClass:(Class) dstCls;
23 | @end
24 |
--------------------------------------------------------------------------------
/inc/atf/ATFramework.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "elements/ATUIElements.h"
19 | #import "locator/Locator.h"
20 | #import "utilities/ATUtilities.h"
21 | #import "harness/Harness.h"
22 | #import "model/model.h"
23 | #import "TestClassProtocol.h"
24 | #import "Appecker/Appecker.h"
25 |
--------------------------------------------------------------------------------
/inc/atf/Appecker/Appecker.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import
19 | #import "ATLauncher.h"
20 | #import "ATLogger.h"
21 |
22 | @interface Appecker : NSObject
23 | {
24 | BOOL m_macroRecMode;
25 | BOOL m_start;
26 | BOOL m_background;
27 | }
28 |
29 | +(Appecker*) sharedInstance;
30 | -(void) turnOff;
31 | -(BOOL) isInMacroRecMode;
32 | -(void) enableMacroRecMode;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/inc/atf/TestClassProtocol.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @protocol TestClass
20 |
21 | @required
22 |
23 | @optional
24 | -(void)setup;
25 | -(void)teardown;
26 | -(void)setupCase;
27 | -(void)teardownCase;
28 |
29 | +(NSDictionary *)registerCaseInformation;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATButton.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface UIButton (ATButton)
21 |
22 | -(NSString *) atfCurrentTitle;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATKeyboard.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATKeyboard : NSObject {
21 |
22 | }
23 |
24 | +(BOOL) isAvailable;
25 | +(UIWindow*) keyboard;
26 | +(void) closeKeyboard;
27 | //+(void) clickReturnKey;
28 | //+(void) clickSpaceKey;
29 | @end
30 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATLabel.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UILabel (ATLabel)
20 |
21 | -(NSString *) atfText;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATMPMoviePlayerController.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import
19 |
20 | @interface MPMoviePlayerController (ATMPMoviePlayerController)
21 |
22 | -(NSURL*) getContentURL;
23 | -(BOOL) isControlBarShowing;
24 | -(void) atfStop;
25 | -(void) atfPause;
26 | -(void) atfPlay;
27 | -(void) atfBeginSeekingBackward;
28 | -(void) atfBeginSeekingForward;
29 | -(void) atfEndSeeking;
30 | -(void) clickForward;
31 | -(void) clickBack;
32 | -(void) clickMiddleBtn;
33 | -(void) clickDone;
34 | -(void) clickPause;
35 | -(void) clickPlay;
36 | -(void) setProgress:(NSUInteger) progress;
37 | -(void) showControlBar;
38 | -(void) clickZoomBtn;
39 | @end
40 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATNavigationBar.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UINavigationBar (ATNavigationBar)
20 |
21 | -(void) clickLeftBtn;
22 | -(void) clickRightBtn;
23 | -(void) clickBtnWithIdx:(int) idx;
24 | @end
25 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATPickerView.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UIPickerView (ATPickerView)
20 |
21 | -(void)selectRow:(NSInteger)row inComponent:(NSInteger)component;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATScrollView.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UIScrollView ( ATScrollowView )
20 | -(void) scrollsSubViewVisible:(UIView*) view;
21 | -(void) scrollToTop;
22 | -(void) scrollToBottom;
23 | -(void) scrollToLeft;
24 | -(void) scrollToRight;
25 | -(void) scrollUp;
26 | -(void) scrollDown;
27 | -(void) scrollLeft;
28 | -(void) scrollRight;
29 | -(void) scrollVertically:(int)offset;
30 | -(void) scrollHorizontally:(int)offset;
31 | @end
32 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATSlider.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UISlider (ATSlider)
20 |
21 | -(void)atfSetValue:(float)value;
22 | @end
23 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATSwitch.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UISwitch (ATSwitch)
20 |
21 | -(void)setStatus:(BOOL)on;
22 | @end
23 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATTableView.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATFramework.h"
19 |
20 | @interface UITableView (ATTableView)
21 |
22 | -(UITableViewCell *)cellAtRowIndex:(NSInteger)rowIndex inSection:(NSInteger)sectionIndex;
23 | -(void)scrollToRowAtIndexPath:(NSInteger)rowIndex inSection:(NSInteger)sectionIndex;
24 | -(void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath;
25 | -(void)scrollToTop;
26 | -(void)scrollToBottom;
27 | -(void)iterateWithObject:(id)target predicate:(SEL) predicate method:(SEL) method localMem:(NSMutableDictionary*) localMem;
28 | -(void)clickCellInRow:(int) row section:(int) section;
29 | @end
30 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATTableViewCell.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UITableViewCell (ATTableViewCell)
20 |
21 | -(void)clickRemoveControlMinusButton;
22 | -(void)clickRemoveControlConfirmButton;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATTextField.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UITextField (ATTextField)
20 |
21 | -(NSString *) atfText;
22 | -(NSString *) atfPlaceHolder;
23 |
24 | -(void)input:(NSString *)text;
25 | -(void)inputAndReturn:(NSString *)text;
26 | @end
27 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATTextView.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface UITextView (ATTextView)
21 |
22 | -(NSString *) atfText;
23 | -(NSString *) atfPlaceHolder;
24 |
25 | -(void)input:(NSString *)text;
26 | -(void)inputCharacters:(NSString *)text;
27 | -(void)simulateReturn;
28 | -(void)commitPSMUpdate;
29 | -(void)commitUpdateByNL;
30 | @end
31 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATUIElements.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATView.h"
19 | #import "ATWindow.h"
20 | #import "ATLabel.h"
21 | #import "ATButton.h"
22 | #import "ATTextField.h"
23 | #import "ATTextView.h"
24 | #import "ATSlider.h"
25 | #import "ATSwitch.h"
26 | #import "ATTableView.h"
27 | #import "ATTableViewCell.h"
28 | #import "ATScrollView.h"
29 | #import "ATPickerView.h"
30 | #import "ATKeyboard.h"
31 | #import "ATMPMoviePlayerController.h"
32 | #import "ATNavigationBar.h"
33 | #import "ATWebView.h"
34 |
35 |
--------------------------------------------------------------------------------
/inc/atf/elements/ATWindow.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface UIWindow (ATWindow)
20 |
21 | + (id)mainWindow;
22 | + (UIActionSheet *)actionSheet;
23 | + (UIAlertView *)alertView;
24 | + (UIWindow *)activityIndicatorWindow;
25 | + (void)printTree;
26 | + (BOOL) tapAlertViewButtonWithTag:(int) tag;
27 |
28 | +(UIWindow*) TopMostWindow;
29 | +(void) TapAtScrPos:(CGPoint) pos;
30 | +(void) TapAtScrCenter;
31 | +(UIWindowLevel) GetHighestWindowLevel;
32 | +(BOOL) IsViewVisible:(UIView*) rootView;
33 | +(BOOL) IsViewTransparent:(UIView*) view;
34 |
35 | - (id)subviewController;
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/inc/atf/eventSynthesize/EventProxy.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface GSEventProxy : NSObject
21 | {
22 | @public
23 | int ignored1[5];
24 | float x;
25 | float y;
26 | int ignored2[18];
27 | float x2;
28 | float y2;
29 | int ignored3[4];
30 | }
31 | @end
32 |
33 |
--------------------------------------------------------------------------------
/inc/atf/eventSynthesize/EventSynthesize.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "EventProxy.h"
19 |
20 | @interface UIEventInternal : NSObject
21 | {
22 | @public
23 | NSTimeInterval _timestamp;
24 | }
25 | @end
26 |
27 |
28 | @interface UITouchesEventInternal : UIEventInternal
29 | {
30 | GSEventProxy *_gsEvent;
31 | NSMutableSet *_touches;
32 | CFMutableDictionaryRef _keyedTouches;
33 | }
34 |
35 | - (id)initWithTouch:(UITouch *)touch;
36 |
37 | - (id)initWithTouches:(NSSet *)touches;
38 |
39 | @end
40 |
41 |
--------------------------------------------------------------------------------
/inc/atf/eventSynthesize/TouchSynthesize.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | #import
20 |
21 |
22 | @interface UITouch (Synthesize)
23 |
24 |
25 | -(id)initInView:(UIView *)view;
26 | -(id)initInView:(UIView *)view withPosition:(CGPoint)pos;
27 | -(id)initInView:(UIView *)view withPosition:(CGPoint)pos withTapCount:(int)tapCount isFirstTouchForView:(BOOL)isFirstTouch;
28 | -(void)changeToPhase: (UITouchPhase)phase;
29 | - (void)setLocationInWindow:(CGPoint)location;
30 | //- (void)setLocationInView:(CGPoint)locationInView;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/inc/atf/eventSynthesize/UITouch.h:
--------------------------------------------------------------------------------
1 | // Created by Eric Firestone on 5/20/11.
2 | // Licensed to Square, Inc. under one or more contributor license agreements.
3 | // See the LICENSE file distributed with this work for the terms under
4 | // which Square, Inc. licenses this file to you.
5 |
6 | #import
7 | #import
8 | #ifdef __IPHONE_6_1
9 | @interface UITouch() {
10 | NSTimeInterval _timestamp;
11 | UITouchPhase _phase;
12 | UITouchPhase _savedPhase;
13 | NSUInteger _tapCount;
14 |
15 | UIWindow *_window;
16 | UIView *_view;
17 | UIView *_gestureView;
18 | UIView *_warpedIntoView;
19 | NSMutableArray *_gestureRecognizers;
20 | NSMutableArray *_forwardingRecord;
21 |
22 | CGPoint _locationInWindow;
23 | CGPoint _previousLocationInWindow;
24 | UInt8 _pathIndex;
25 | UInt8 _pathIdentity;
26 | float _pathMajorRadius;
27 | struct {
28 | unsigned int _firstTouchForView:1;
29 | unsigned int _isTap:1;
30 | unsigned int _isDelayed:1;
31 | unsigned int _sentTouchesEnded:1;
32 | unsigned int _abandonForwardingRecord:1;
33 | } _touchFlags;
34 |
35 | }
36 |
37 | @end
38 | #endif
--------------------------------------------------------------------------------
/inc/atf/harness/ATCaseRunner.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATJobSummary.h"
19 | #import "ATTestClass.h"
20 | #import "ATTestCase.h"
21 |
22 | @interface ATCaseRunner : NSObject {
23 | ATJobSummary * jobSummary;
24 | }
25 |
26 | @property (nonatomic, readonly) ATJobSummary * jobSummary;
27 |
28 | -(id)init;
29 | -(void)runCases:(NSArray *)cases withTargetClass:(Class) targetClass;
30 | +(ATTestCase*) GetCurCase;
31 | +(NSString*) GetCurCaseID;
32 | +(BOOL) IsRunningCase;
33 | @end
34 |
--------------------------------------------------------------------------------
/inc/atf/harness/ATCasesAssembler.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATCasesAssembler : NSObject {
21 | NSMutableDictionary * _testClassSet;
22 | }
23 |
24 | @property (nonatomic, retain, readonly) NSDictionary * testClassSet;
25 |
26 | -(id)init;
27 | -(NSDictionary *)getAllCases;
28 |
29 | +(ATCasesAssembler*)sharedInstance;
30 | +(void)releaseSharedInstance;
31 | +(ATCasesAssembler*)createSharedInstance;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/inc/atf/harness/ATException.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATException : NSObject {
21 | NSMutableString *callStack;
22 | NSString *message;
23 | }
24 | @property (nonatomic, retain) NSString* message;
25 | @property (nonatomic, retain, readonly) NSString * callStack;
26 |
27 | +(id)exceptionWithMessage:(NSString *)msg;
28 | -(id)initWithMessage:(NSString *)message;
29 | @end
30 |
31 | @interface ATValidationException : ATException {
32 |
33 | }
34 |
35 | @end
--------------------------------------------------------------------------------
/inc/atf/harness/ATExceptionHandler.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @protocol AppeckerCrashHandler
20 | @required
21 | -(void) onCrash;
22 | @end
23 |
24 | @interface ATExceptionHandler : NSObject
25 | {
26 | @private
27 | BOOL m_needsTeardown;
28 | BOOL m_needsCleanEnv;
29 | id m_crashDelegate;
30 | BOOL m_onUserCrashFlow;
31 | }
32 |
33 | +(ATExceptionHandler*) sharedInstance;
34 | -(void) setCrashDelegate:(id) delegate;
35 | @end
36 |
--------------------------------------------------------------------------------
/inc/atf/harness/ATLauncher.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface ATLauncher : NSObject {
20 |
21 | }
22 | +(void) setupWithArgs:(const char**)argv count:(int) argc;
23 | +(void) tearDown;
24 | +(void) run;
25 | +(NSString *) cmdParam:(NSString *) parameterName;
26 | +(BOOL) isRunningFromCmdLine;
27 | +(NSString*) getValueForParam:(NSString*) key;
28 | @end
29 |
--------------------------------------------------------------------------------
/inc/atf/harness/ATScheduler.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCaseRunner.h"
19 |
20 |
21 | @interface ATScheduler : NSObject {
22 |
23 | }
24 |
25 | +(void) traverse:(ATCaseRunner *)caseRunner;
26 |
27 | @end
28 |
29 |
--------------------------------------------------------------------------------
/inc/atf/harness/ATTestClass.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import
19 |
20 | @interface ATTestClass : NSObject {
21 | Class _testClass;
22 | NSString *_testClassDescription;
23 | NSMutableDictionary *_testCases;
24 | }
25 |
26 | @property (nonatomic, assign) Class testClass;
27 | @property (nonatomic, retain) NSString *testClassDescription;
28 | @property (nonatomic, retain, readonly) NSDictionary *testCases;
29 |
30 | +(id)testClassWithType:(Class) testClassType withDescription:(NSString *) description;
31 | -(id)initWithType:(Class)testClassType withDescription:(NSString *)classDescription;
32 | -(void)findAllTestCases;
33 | @end
34 |
--------------------------------------------------------------------------------
/inc/atf/harness/Harness.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATLauncher.h"
19 | #import "ATCaseRunner.h"
20 | #import "ATTestCase.h"
21 | #import "ATTestClass.h"
22 | #import "ATCasesAssembler.h"
23 | #import "ATJobSummary.h"
24 | #import "ATExceptionHandler.h"
25 |
--------------------------------------------------------------------------------
/inc/atf/locator/ATAndConditions.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h"
19 |
20 | @interface ATAndConditions : ATCondition {
21 | NSMutableArray * _andConditions;
22 | }
23 |
24 | @property(nonatomic, readonly) NSArray *andConditions;
25 |
26 | -(id) initWithConditions:(ATCondition *) firstCondition, ...NS_REQUIRES_NIL_TERMINATION;
27 |
28 | -(void)addCondition:(ATCondition *)condition;
29 | -(void)addConditions:(NSArray *)conditions;
30 |
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/inc/atf/locator/ATAttributesCondition.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h";
19 |
20 | @interface ATAttributesCondition : ATCondition {
21 | NSDictionary * attributeDict;
22 | }
23 |
24 | -(id)initWithArrributeName:(NSString *)attrName attributeValue:(NSString *)attrValue;
25 | -(id)initWithDictionary:(NSDictionary *)attributes;
26 | @end
27 |
--------------------------------------------------------------------------------
/inc/atf/locator/ATClassCondition.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h"
19 |
20 | @interface ATClassCondition : ATCondition {
21 | Class classObject;
22 | }
23 |
24 | @property(nonatomic, retain)Class classObject;
25 |
26 | -(id)initWithClassName:(NSString *)clssName;
27 | -(id)initWithClass:(Class)classObj;
28 |
29 | @end
30 |
31 | @interface ATExactClassCondition : ATCondition {
32 | Class classObject;
33 | }
34 |
35 | @property(nonatomic, retain)Class classObject;
36 |
37 | -(id)initWithClassName:(NSString *)clssName;
38 | -(id)initWithClass:(Class)classObj;
39 |
40 | @end
41 |
42 |
--------------------------------------------------------------------------------
/inc/atf/locator/ATCondition.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATCondition : NSObject {
21 |
22 | }
23 |
24 | -(BOOL)check:(UIView *)view;
25 |
26 | @end
27 |
28 | @interface ATCondition (ATConditionFacotry)
29 |
30 | +(ATCondition *) conditionWithArrributeName:(NSString *)attrName attributeValue:(NSString *)attrValue;
31 | +(ATCondition *) conditionWIthAttributes:(NSDictionary *)attributes;
32 | +(ATCondition *) conditionWithClassName:(NSString *)className;
33 | +(ATCondition *) conditionWithClass:(Class)classObj;
34 |
35 | +(ATCondition *) conditionWithFrame:(CGRect) frame bias:(NSUInteger) bias;
36 | +(ATCondition *) conditionWithAttributeName:(NSString*) attributeName attrValKeyword:(NSString*) keyword;
37 | +(ATCondition *) conditionWithSubViewDesc:(NSString*) desc;
38 |
39 |
40 | @end
41 |
42 |
--------------------------------------------------------------------------------
/inc/atf/locator/ATFrameCondition.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h"
19 |
20 | @interface ATFrameCondition : ATCondition
21 | {
22 | CGRect frame;
23 | int bias;
24 | }
25 |
26 | -(id) initWithFrameRect:(CGRect)frame_a bias:(int) bias_a;
27 |
28 | @end
--------------------------------------------------------------------------------
/inc/atf/locator/ATKeywordCondition.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h"
19 |
20 |
21 | @interface ATKeywordCondition : ATCondition
22 | {
23 | NSString* attrName;
24 | NSString* keyword;
25 | }
26 |
27 | -(id) initWithAttributeName:(NSString*)attrName_a attrValKeyword:(NSString*) keyword_a;
28 |
29 | @end
--------------------------------------------------------------------------------
/inc/atf/locator/ATOrConditions.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h"
19 |
20 | @interface ATOrConditions : ATCondition {
21 | NSMutableArray * _orConditions;
22 | }
23 |
24 | @property(nonatomic, retain, readonly) NSArray *orConditions;
25 |
26 | -(id) initWithConditions:(ATCondition *) firstCondition, ...;
27 |
28 | -(void)addCondition:(ATCondition *)condition;
29 | -(void)addConditions:(NSArray *)conditions;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/inc/atf/locator/ATSubViewDescCondition.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h"
19 |
20 | @interface ATSubViewDescCondition : ATCondition
21 | {
22 | NSString *rootViewClassName;
23 | NSMutableDictionary* subviewInfo;
24 | }
25 |
26 | -(id) initWithStringDesc:(NSString*) desc;
27 | -(void) dealloc;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/inc/atf/locator/ATViewQuery.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATCondition.h"
19 |
20 | @interface ATViewQuery : NSObject {
21 |
22 | }
23 |
24 | +(UIView *)findFirstViewInTree:(UIView *)parentView byCondition:(ATCondition *)condition;
25 | +(NSArray *)findAllViewsInTree:(UIView *)parentView byCondition:(ATCondition *)condition;
26 |
27 | @end
28 |
29 | @interface ATViewQuery (ATViewQueryHelper)
30 |
31 | +(UIView *)findViewInTree:(UIView *)rootView byAttributeName:(NSString *)attrName attributeValue:(NSString *)attrValue;
32 | +(UIView *)findViewInTree:(UIView *)rootView byAttributes:(NSDictionary *)attributesSet;
33 |
34 | +(UIView *)findViewInMainWindowByTag:(int)tag;
35 | +(UIView *)findViewInWindowsByTag:(int)tag;
36 | +(UIView *)findViewInTree:(UIView *)rootView byTag:(int)tag;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/inc/atf/locator/Locator.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATViewQuery.h"
19 | #import "ATCondition.h"
20 | #import "ATClassCondition.h"
21 | #import "ATAttributesCondition.h"
22 | #import "ATOrConditions.h"
23 | #import "ATAndConditions.h"
24 | #import "ATFrameCondition.h"
25 | #import "ATSubViewDescCondition.h"
26 | #import "ATKeywordCondition.h"
27 |
28 |
29 |
--------------------------------------------------------------------------------
/inc/atf/model/ATRandom.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATRandom : NSObject {
21 | unsigned _seed;
22 | unsigned nextSeed;
23 | }
24 | @property (nonatomic) unsigned seed;
25 |
26 | -(id)initWithSeed:(unsigned) seed;
27 | -(int) getNext;
28 | -(int) getNextBetween:(int)min andBetween:(int)max;
29 | -(int) getNextInteger:(int)boundary;
30 |
31 | +(int) randomBetween:(int)min Max:(int)max Seed:(unsigned)seed;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/inc/atf/model/model.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATModel.h"
19 | #import "ATModelEngine.h"
20 | #import "ATRandom.h"
21 | #import "ATAction.h"
22 |
23 |
--------------------------------------------------------------------------------
/inc/atf/utilities/ATAssert.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | void ATCaptureScreen();
18 | void ATFail(NSString * message);
19 | void ATFailIf(BOOL predication, NSString * message);
20 | void ATFailFormat(NSString * format,...);
21 | void ATFailFormatIf(BOOL predication, NSString * format,...);
22 |
23 | void ATWarnIf(BOOL predication, NSString * message);
24 | void ATWarnFormatIf(BOOL predication, NSString * format,...);
25 |
26 | void ATMessageIf(BOOL predication, NSString * message);
27 | void ATMessageFormatIf(BOOL predication, NSString * format,...);
28 |
--------------------------------------------------------------------------------
/inc/atf/utilities/ATDispatcher.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATDispatcher : NSObject {
21 | id _target;
22 | bool _retainTarget;
23 | }
24 |
25 | +(id) dispatcherWithTarget:(id)target;
26 |
27 | -(id) initWithTarget:(id)target;
28 | -(id) initWithTarget:(id)target retainTarget:(BOOL)retainTarget;
29 |
30 | @end
31 |
32 | @interface NSObject(ATDispatching)
33 | -(id) dispatcher;
34 | @end
35 |
--------------------------------------------------------------------------------
/inc/atf/utilities/ATRetryHelper.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATRetryHelper : NSObject {
21 |
22 | }
23 |
24 | +(BOOL) tryTaskWithSelector:(SEL) taskSelector target:aTarget quitAfter:(NSTimeInterval) interval;
25 | +(BOOL) tryTaskWithSelector:(SEL) taskSelector target:aTarget quitAfter:(NSTimeInterval) interval expecting:(BOOL) expectedResult;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/inc/atf/utilities/ATUtilities.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import "ATLogger.h"
19 | #import "CaseSelectorParser.h"
20 | #import "ATXmlHelper.h"
21 | #import "ATDispatcher.h"
22 | #import "ATRetryHelper.h"
23 | #import "ATAssert.h"
24 | #import "ATWaitUtility.h"
25 | #import "AppeckerTraceManager.h"
--------------------------------------------------------------------------------
/inc/atf/utilities/ATWaitUtility.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | void AppeckerWait(NSTimeInterval time);
20 | void AppeckerLockWait();
21 | void AppeckerUnlockWait();
--------------------------------------------------------------------------------
/inc/atf/utilities/ATXmlHelper.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | @interface ATXmlHelper : NSObject {
21 |
22 | }
23 | +(NSString *) escape:(NSString *)input;
24 | +(NSString *)filterInvalidChar:(NSString *) data;
25 | @end
26 |
--------------------------------------------------------------------------------
/macroRec/ATHTMLAlertView.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface ATHTMLAlertView : UIView
20 | {
21 | UIWindow* m_window;
22 | UIWebView* m_webView;
23 | UIButton* m_title;
24 | id m_dismissTarget;
25 | SEL m_dismissAction;
26 | }
27 |
28 | -(id) initWithTitle:(NSString*) title message:(NSString*) htmlMessage;
29 | -(void) show;
30 | -(void) dismiss;
31 | -(void) setDismissAction:(SEL) selector withTarget:(id) target;
32 | @end
33 |
--------------------------------------------------------------------------------
/macroRec/ATMacroRec.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | typedef enum{
20 | AtfRecordGenCase,
21 | AtfRecordLocating,
22 | AtfRecordOffLine,
23 | }AtfRecordState;
24 |
25 | @interface ATMacroRec : NSObject
26 | {
27 | NSMutableString* m_code;
28 | BOOL m_ignore;
29 | AtfRecordState m_state;
30 | }
31 |
32 | +(ATMacroRec*) sharedInstance;
33 | -(void) onTouchEvent:(UIEvent*) touchEvent;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/macroRec/ATMacroRecSwitch.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface ATMacroRecSwitch : UIWindow
20 | {
21 | CGPoint m_oldPos;
22 | UITapGestureRecognizer* m_tapRecognizer;
23 | SEL m_doubleTapSelector;
24 | id m_doubleTapTarget;
25 | }
26 |
27 | +(ATMacroRecSwitch*) sharedInstance;
28 | -(void) show;
29 | -(void) hide;
30 | -(void) setDoubleTapAction:(SEL) selector target:(id) target;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/macroRec/ATTextAlertView.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface MyTextView : UITextView
20 | @end
21 |
22 | @interface ATTextAlertView : UIView
23 | {
24 | UIWindow* m_window;
25 | MyTextView* m_text;
26 | UIButton* m_title;
27 | UIView* m_zeroView;
28 | SEL m_dismissAction;
29 | id m_dismissTarget;
30 | }
31 | -(id) initWithTitle:(NSString*) title message:(NSString*) message;
32 | -(void) dismiss;
33 | -(void) show;
34 | -(void) setDismissAction:(SEL) selector withTarget:(id) target;
35 | @end
36 |
--------------------------------------------------------------------------------
/model/ATModelInner.mm:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "ATModel.h"
18 |
19 | @implementation ATModelInner
20 |
21 | @synthesize outerModel;
22 |
23 | -(ATModelEngine *) engine{
24 | return [outerModel engine];
25 | }
26 | -(void)reActive
27 | {
28 | }
29 | @end
30 |
--------------------------------------------------------------------------------
/model/ATModelOuter.mm:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "ATModel.h"
18 | #import "ATModelEngine.h"
19 |
20 | @implementation ATModelOuter
21 |
22 | @synthesize engine;
23 | @synthesize stack;
24 |
25 | -(void)reActive:(ATModelOuter *)currentModel
26 | {
27 | [self verify];
28 | }
29 |
30 | -(void)verify
31 | {
32 |
33 | }
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/utilities/ATToolkit.mm:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import "ATToolkit.h"
18 |
19 | CGSize ATGetScrSize()
20 | {
21 | return [UIScreen mainScreen].bounds.size;
22 | }
23 |
24 | CGSize ATClamp(CGSize original, CGSize limit)
25 | {
26 | original.width = original.width > limit.width ? limit.width : original.width;
27 | original.height = original.height > limit.height ? limit.height : original.height;
28 |
29 | return original;
30 | }
31 |
32 | CGSize ATSizeFloor(CGSize size)
33 | {
34 | size.width = floor(size.width);
35 | size.height = floor(size.height);
36 |
37 | return size;
38 | }
39 |
40 | NSUInteger ATFloor(CGFloat val)
41 | {
42 | return (NSUInteger)floor(val);
43 | }
44 |
--------------------------------------------------------------------------------
/utilities/privateHeader/ATAnimationDelegateWrapper.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 | #import
19 |
20 | @interface ATAnimationDelegateWrapper : NSObject
21 | {
22 | id m_delegate;
23 | }
24 | -(id) initWithDelegate:(id) delegate;
25 | @end
26 |
--------------------------------------------------------------------------------
/utilities/privateHeader/ATCommonMacro.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #ifndef atf_ATCommonMacro_h
18 | #define atf_ATCommonMacro_h
19 |
20 | #define Appecker_DECLARE_AS_SINGLETON(interfaceName) \
21 | + (interfaceName*)sharedInstance; \
22 |
23 | #define Appecker_DEFINE_SINGLETON(interfaceName) \
24 | static interfaceName* interfaceName##Instance = nil; \
25 | + (interfaceName*) sharedInstance \
26 | { \
27 | if (interfaceName##Instance == nil) \
28 | interfaceName##Instance = [[interfaceName alloc] init]; \
29 | return interfaceName##Instance; \
30 | }
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/utilities/privateHeader/ATToolkit.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 |
20 | CGSize ATGetScrSize();
21 | CGSize ATClamp(CGSize original, CGSize limit);
22 | NSUInteger ATFloor(CGFloat val);
23 | CGSize ATSizeFloor(CGSize size);
--------------------------------------------------------------------------------
/utilities/privateHeader/ATWaitUtilityPrivate.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | void AppeckerBlock();
--------------------------------------------------------------------------------
/utilities/privateHeader/AppeckerContextWrapper.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #import
18 |
19 | @interface AppeckerContextWrapper : NSObject
20 | {
21 | CGSize m_size;
22 | NSUInteger m_buffLen;
23 | CGColorSpaceRef m_colorSpace;
24 | NSUInteger m_bytePerPixel;
25 | unsigned char* m_rawData;
26 | CGContextRef m_context;
27 | }
28 |
29 | -(id) initWithUIView:(UIView*) view;
30 | -(BOOL) isTransparent;
31 | @property (nonatomic,readonly) CGContextRef context;
32 | @property (nonatomic,readonly) NSUInteger bytesPerPixel;
33 | @property (nonatomic,readonly) unsigned char* rawData;
34 | @property (nonatomic,readonly) NSUInteger buffLen;
35 | @end
36 |
--------------------------------------------------------------------------------
/utilities/privateHeader/TouchUtility.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
2 | // Tencent is pleased to support the open source community by making Appecker available.
3 | //
4 | // Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
7 | // compliance with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software distributed under the License is
12 | // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | // either express or implied. See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////////////////////////////////
16 |
17 | #ifndef atf_TouchUtility_h
18 | #define atf_TouchUtility_h
19 |
20 | void visualizeTouch(UITouch* touch);
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------