From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../python/gyp/test/mac/xcuitest/Info.plist | 28 +++++++++ .../python/gyp/test/mac/xcuitest/MyAppDelegate.h | 8 +++ .../python/gyp/test/mac/xcuitest/MyAppDelegate.m | 19 ++++++ .../python/gyp/test/mac/xcuitest/TestCase.m | 15 +++++ third_party/python/gyp/test/mac/xcuitest/main.m | 15 +++++ .../python/gyp/test/mac/xcuitest/resource.txt | 1 + third_party/python/gyp/test/mac/xcuitest/test.gyp | 69 ++++++++++++++++++++++ 7 files changed, 155 insertions(+) create mode 100644 third_party/python/gyp/test/mac/xcuitest/Info.plist create mode 100644 third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.h create mode 100644 third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.m create mode 100644 third_party/python/gyp/test/mac/xcuitest/TestCase.m create mode 100644 third_party/python/gyp/test/mac/xcuitest/main.m create mode 100644 third_party/python/gyp/test/mac/xcuitest/resource.txt create mode 100644 third_party/python/gyp/test/mac/xcuitest/test.gyp (limited to 'third_party/python/gyp/test/mac/xcuitest') diff --git a/third_party/python/gyp/test/mac/xcuitest/Info.plist b/third_party/python/gyp/test/mac/xcuitest/Info.plist new file mode 100644 index 0000000000..ae8852b836 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + + diff --git a/third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.h b/third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.h new file mode 100644 index 0000000000..445be2cb42 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.h @@ -0,0 +1,8 @@ +// Copyright (c) 2013 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import + +@interface MyAppDelegate : NSObject +@end diff --git a/third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.m b/third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.m new file mode 100644 index 0000000000..6ad60fa9d4 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.m @@ -0,0 +1,19 @@ +// Copyright (c) 2013 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "MyAppDelegate.h" + + +@implementation MyAppDelegate +@synthesize window; + +- (BOOL)application:(UIApplication *)application + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + self.window = [[UIWindow alloc] init]; + self.window.rootViewController = [[UIViewController alloc] init]; + [self.window makeKeyAndVisible]; + return YES; +} + +@end diff --git a/third_party/python/gyp/test/mac/xcuitest/TestCase.m b/third_party/python/gyp/test/mac/xcuitest/TestCase.m new file mode 100644 index 0000000000..1f32b7af74 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/TestCase.m @@ -0,0 +1,15 @@ +// Copyright (c) 2013 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import + +@interface TestCase : XCTestCase +@end + +@implementation TestCase +- (void)testFoo { + XCUIApplication *foo = [[XCUIApplication alloc] init]; + XCTAssertNotNil(foo, @"expected non-nil object"); +} +@end diff --git a/third_party/python/gyp/test/mac/xcuitest/main.m b/third_party/python/gyp/test/mac/xcuitest/main.m new file mode 100644 index 0000000000..e7cb62e639 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/main.m @@ -0,0 +1,15 @@ +// Copyright (c) 2013 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import + +#import "MyAppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + UIApplicationMain(argc, argv, + nil, NSStringFromClass([MyAppDelegate class])); + } + return 1; +} diff --git a/third_party/python/gyp/test/mac/xcuitest/resource.txt b/third_party/python/gyp/test/mac/xcuitest/resource.txt new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/resource.txt @@ -0,0 +1 @@ +foo diff --git a/third_party/python/gyp/test/mac/xcuitest/test.gyp b/third_party/python/gyp/test/mac/xcuitest/test.gyp new file mode 100644 index 0000000000..80cdf9032d --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/test.gyp @@ -0,0 +1,69 @@ +# Copyright (c) 2013 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'target_defaults': { + 'xcode_settings': { + 'SDKROOT': 'iphoneos', + 'FRAMEWORK_SEARCH_PATHS': [ + '$(inherited)', + '$(DEVELOPER_FRAMEWORKS_DIR)', + ], + 'OTHER_LDFLAGS': [ + '$(inherited)', + '-ObjC', + ], + 'GCC_PREFIX_HEADER': '', + 'CLANG_ENABLE_OBJC_ARC': 'YES', + 'INFOPLIST_FILE': 'Info.plist', + }, + }, + 'targets': [ + { + 'target_name': 'testApp', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'MyAppDelegate.h', + 'MyAppDelegate.m', + 'main.m', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + }, + { + 'target_name': 'tests', + 'type': 'loadable_module', + 'mac_bundle': 1, + 'mac_xcuitest_bundle': 1, + 'sources': [ + 'TestCase.m', + ], + 'dependencies': [ + 'testApp', + ], + 'mac_bundle_resources': [ + 'resource.txt', + ], + 'variables': { + # This must *not* be set for xctest ui tests. + 'xctest_host': '', + }, + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/XCTest.framework', + ] + }, + 'xcode_settings': { + 'WRAPPER_EXTENSION': 'xctest', + 'TEST_TARGET_NAME': 'testApp', + }, + }, + ], +} + -- cgit v1.2.3