Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E313B11D22 for ; Fri, 2 May 2014 06:40:24 +0000 (UTC) Received: (qmail 49544 invoked by uid 500); 2 May 2014 06:40:22 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 49478 invoked by uid 500); 2 May 2014 06:40:21 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 49462 invoked by uid 99); 2 May 2014 06:40:21 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 06:40:21 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id DC16B6EFF; Fri, 2 May 2014 06:40:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: shazron@apache.org To: commits@cordova.apache.org Date: Fri, 02 May 2014 06:40:20 -0000 Message-Id: <8a3e012e786240259ca24415529f9597@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] CB-6567 Adding the OSX platform also copies over the CordovaLibTests (closes #10) Repository: cordova-osx Updated Branches: refs/heads/master 47ac9b3d3 -> b32b674be http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/CDVBase64Tests.m ---------------------------------------------------------------------- diff --git a/CordovaLibTests/CDVBase64Tests.m b/CordovaLibTests/CDVBase64Tests.m new file mode 100644 index 0000000..9680fed --- /dev/null +++ b/CordovaLibTests/CDVBase64Tests.m @@ -0,0 +1,64 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +#import + +@interface CDVBase64Tests : SenTestCase +@end + +@implementation CDVBase64Tests + +- (void)setUp +{ + [super setUp]; + + // setup code here +} + +- (void)tearDown +{ + // Tear-down code here. + + [super tearDown]; +} + +- (void)testBase64Encode +{ + NSString* decodedString = @"abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&"; + NSData* decodedData = [decodedString dataUsingEncoding:NSUTF8StringEncoding]; + + NSString* expectedEncodedString = @"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwIUAjJCVeJg=="; + NSString* actualEncodedString = [decodedData base64EncodedString]; + + STAssertTrue([expectedEncodedString isEqualToString:actualEncodedString], nil); +} + +- (void)testBase64Decode +{ + NSString* encodedString = @"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwIUAjJCVeJg=="; + NSString* decodedString = @"abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&"; + NSData* encodedData = [decodedString dataUsingEncoding:NSUTF8StringEncoding]; + NSData* decodedData = [NSData dataFromBase64String:encodedString]; + + STAssertTrue([encodedData isEqualToData:decodedData], nil); +} + +@end http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/CDVStartPageTests.m ---------------------------------------------------------------------- diff --git a/CordovaLibTests/CDVStartPageTests.m b/CordovaLibTests/CDVStartPageTests.m new file mode 100644 index 0000000..1924061 --- /dev/null +++ b/CordovaLibTests/CDVStartPageTests.m @@ -0,0 +1,60 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +#import "CDVWebViewTest.h" + +@interface CDVStartPageTest : CDVWebViewTest +@end + +@implementation CDVStartPageTest + +- (void)setUp +{ + [super setUp]; +} + +- (void)tearDown +{ + [super tearDown]; +} + +- (void)testDefaultStartPage +{ + [self viewController]; + NSString* geHREF = @"window.location.href"; + NSString* href = [self.webView stringByEvaluatingJavaScriptFromString:geHREF]; + STAssertTrue([href hasSuffix:@"index.html"], @"href should point to index.html"); +} + + +// currently fails + +//- (void)testParametersInStartPage +//{ +// self.startPage = @"index.html?delta=true"; +// [self reloadWebView]; +// NSString* geHREF = @"window.location.href"; +// NSString* href = [self.webView stringByEvaluatingJavaScriptFromString:geHREF]; +// STAssertTrue([href hasSuffix:@"index.html?delta=true"], @"href should point to index.html?delta=true"); +//} + +@end http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/CDVWebViewTest.h ---------------------------------------------------------------------- diff --git a/CordovaLibTests/CDVWebViewTest.h b/CordovaLibTests/CDVWebViewTest.h new file mode 100644 index 0000000..5d64a60 --- /dev/null +++ b/CordovaLibTests/CDVWebViewTest.h @@ -0,0 +1,43 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +@class AppDelegate; +@class CDVViewController; + +@interface CDVWebViewTest : SenTestCase + +@property (nonatomic, strong) NSString* startPage; + +- (AppDelegate*)appDelegate; +- (CDVViewController*)viewController; +- (WebView*)webView; + +// Returns the already registered plugin object for the given class. +- (id)pluginInstance:(NSString*)pluginName; +// Destroys the existing webview and creates a new one. +- (void)reloadWebView; +// Runs the run loop until the given block returns true, or until a timeout +// occurs. +- (void)waitForConditionName:(NSString*)conditionName block:(BOOL (^)())block; +// Convenience function for stringByEvaluatingJavaScriptFromString. +- (NSString*)evalJs:(NSString*)code; +@end http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/CDVWebViewTest.m ---------------------------------------------------------------------- diff --git a/CordovaLibTests/CDVWebViewTest.m b/CordovaLibTests/CDVWebViewTest.m new file mode 100644 index 0000000..5199df0 --- /dev/null +++ b/CordovaLibTests/CDVWebViewTest.m @@ -0,0 +1,125 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVWebViewTest.h" + +#import "AppDelegate.h" +#import "MainViewController.h" + +@interface CDVWebViewTest () +// Runs the run loop until the webview has finished loading. +- (void)waitForPageLoad; +@end + +@implementation CDVWebViewTest + +@synthesize startPage; + +- (void)setUp +{ + [super setUp]; + + // Stop tests on the first failed assertion. Having the test stop on the + // first exception makes it much easier to identify the source of the error. + // On iOS < 5 there is a bug in SenTestingKit where the exception is + // uncaught and the app crashes upon a failed STAssert (oh well). + [self raiseAfterFailure]; +} + +- (void)tearDown +{ + // Enforce that the view controller is released between tests to ensure + // tests don't affect each other. +// [self.appDelegate destroyViewController]; + [super tearDown]; +} + +- (AppDelegate*)appDelegate +{ + return [[NSApplication sharedApplication] delegate]; +} + +- (CDVViewController*)viewController +{ + // Lazily create the view controller so that tests that do not require it + // are not slowed down by it. + if (self.appDelegate.viewController == nil) { + + [self.appDelegate createViewController: self.startPage]; + + // Things break if tearDown is called before the page has finished + // loading (a JS error happens and an alert pops up), so enforce a wait + // here. + [self waitForPageLoad]; + } + STAssertNotNil(self.appDelegate.viewController, @"createViewController failed"); + return self.appDelegate.viewController; +} + +- (WebView*)webView +{ + return self.viewController.webView; +} + +- (id)pluginInstance:(NSString*)pluginName +{ + id ret = [self.viewController getCommandInstance:pluginName]; + + STAssertNotNil(ret, @"Missing plugin %@", pluginName); + return ret; +} + +- (void)reloadWebView +{ + [self.appDelegate destroyViewController]; + [self viewController]; +} + +- (void)waitForConditionName:(NSString*)conditionName block:(BOOL (^)())block +{ + // Number of seconds to wait for a condition to become true before giving up. + const NSTimeInterval kConditionTimeout = 5.0; + // Useful when debugging so that it does not timeout after one loop. + const int kMinIterations = 4; + + NSDate* startTime = [NSDate date]; + int i = 0; + + while (!block()) { + [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + NSTimeInterval elapsed = -[startTime timeIntervalSinceNow]; + STAssertTrue(i < kMinIterations || elapsed < kConditionTimeout, + @"Timed out waiting for condition %@", conditionName); + ++i; + } +} + +- (void)waitForPageLoad +{ + [self waitForConditionName:@"PageLoad" block:^{ + return [@"true" isEqualToString :[self evalJs:@"window.pageIsLoaded"]]; + }]; +} + +- (NSString*)evalJs:(NSString*)code +{ + return [self.webView stringByEvaluatingJavaScriptFromString:code]; +} + +@end http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/CordovaLibTests-Info.plist ---------------------------------------------------------------------- diff --git a/CordovaLibTests/CordovaLibTests-Info.plist b/CordovaLibTests/CordovaLibTests-Info.plist new file mode 100644 index 0000000..b96525e --- /dev/null +++ b/CordovaLibTests/CordovaLibTests-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.apache.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/CordovaLibTests-Prefix.pch ---------------------------------------------------------------------- diff --git a/CordovaLibTests/CordovaLibTests-Prefix.pch b/CordovaLibTests/CordovaLibTests-Prefix.pch new file mode 100644 index 0000000..55b5f02 --- /dev/null +++ b/CordovaLibTests/CordovaLibTests-Prefix.pch @@ -0,0 +1,15 @@ +// +// CordovaLibTests-Prefix.pch +// CordovaLibTests +// +// Created by Tobias Bocanegra on 4/30/14. +// Copyright (c) 2014 Apache Software Foundation. All rights reserved. +// + +#ifndef CordovaLibTests_CordovaLibTests_Prefix_pch +#define CordovaLibTests_CordovaLibTests_Prefix_pch + +// Include any system framework and library headers here that should be included in all compilation units. +// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file. + +#endif http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj ---------------------------------------------------------------------- diff --git a/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj b/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj new file mode 100644 index 0000000..05c90f0 --- /dev/null +++ b/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj @@ -0,0 +1,610 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 703D32501910CECA0087AC28 /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 703D324B1910CEB70087AC28 /* libCordova.a */; }; + 703D32551910D0B50087AC28 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 70DAA8FF1908E37C00AF3749 /* AppDelegate.m */; }; + 703D32561910D0BA0087AC28 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 70DAA9281908E93500AF3749 /* MainViewController.m */; }; + 703D32571910D0C00087AC28 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 70DAA91E1908E7CC00AF3749 /* MainViewController.xib */; }; + 703D32581910D0C30087AC28 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 70DAA8F81908E37C00AF3749 /* main.m */; }; + 70718D80190A4201002ADC5F /* CDVBase64Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 70718D7F190A4201002ADC5F /* CDVBase64Tests.m */; }; + 70BD675918FF9DAE00A1EFCF /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 70BD675718FF9DAE00A1EFCF /* InfoPlist.strings */; }; + 70DAA8E71908E05900AF3749 /* CDVStartPageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 70DAA8E61908E05900AF3749 /* CDVStartPageTests.m */; }; + 70DAA8EA1908E07E00AF3749 /* CDVWebViewTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 70DAA8E91908E07E00AF3749 /* CDVWebViewTest.m */; }; + 70DAA8F11908E37C00AF3749 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70BD673D18FF9DAE00A1EFCF /* Cocoa.framework */; }; + 70DAA8F71908E37C00AF3749 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 70DAA8F51908E37C00AF3749 /* InfoPlist.strings */; }; + 70DAA8FD1908E37C00AF3749 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 70DAA8FB1908E37C00AF3749 /* Credits.rtf */; }; + 70DAA9221908E80C00AF3749 /* www in Resources */ = {isa = PBXBuildFile; fileRef = 70DAA9201908E80C00AF3749 /* www */; }; + 70DAA9231908E80C00AF3749 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 70DAA9211908E80C00AF3749 /* config.xml */; }; + 70DAA9251908E82600AF3749 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70DAA9241908E82600AF3749 /* WebKit.framework */; }; + 70E382C91909BBFF0029A2F0 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70E382C81909BBFF0029A2F0 /* SenTestingKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 703D324A1910CEB70087AC28 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 703D32441910CEB70087AC28 /* CordovaLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 70BD673A18FF9DAE00A1EFCF; + remoteInfo = Cordova; + }; + 703D32611910DA6A0087AC28 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 703D32441910CEB70087AC28 /* CordovaLib.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 70BD673918FF9DAE00A1EFCF; + remoteInfo = Cordova; + }; + 703D32631910DA6D0087AC28 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 70BD673218FF9DAE00A1EFCF /* Project object */; + proxyType = 1; + remoteGlobalIDString = 70DAA8EF1908E37C00AF3749; + remoteInfo = TestApp; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 703D32441910CEB70087AC28 /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = ../CordovaLib/CordovaLib.xcodeproj; sourceTree = ""; }; + 703D32601910D7920087AC28 /* CordovaLibTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CordovaLibTests-Prefix.pch"; sourceTree = ""; }; + 70718D7F190A4201002ADC5F /* CDVBase64Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVBase64Tests.m; sourceTree = ""; }; + 70BD673D18FF9DAE00A1EFCF /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 70BD674018FF9DAE00A1EFCF /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 70BD674118FF9DAE00A1EFCF /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + 70BD674218FF9DAE00A1EFCF /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 70BD674D18FF9DAE00A1EFCF /* CordovaLibTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CordovaLibTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; + 70BD674E18FF9DAE00A1EFCF /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 70BD675618FF9DAE00A1EFCF /* CordovaLibTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CordovaLibTests-Info.plist"; sourceTree = ""; }; + 70BD675818FF9DAE00A1EFCF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 70DAA8E61908E05900AF3749 /* CDVStartPageTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVStartPageTests.m; sourceTree = ""; }; + 70DAA8E81908E07E00AF3749 /* CDVWebViewTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewTest.h; sourceTree = ""; }; + 70DAA8E91908E07E00AF3749 /* CDVWebViewTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewTest.m; sourceTree = ""; }; + 70DAA8F01908E37C00AF3749 /* TestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 70DAA8F41908E37C00AF3749 /* TestApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestApp-Info.plist"; sourceTree = ""; }; + 70DAA8F61908E37C00AF3749 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 70DAA8F81908E37C00AF3749 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 70DAA8FA1908E37C00AF3749 /* TestApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "TestApp-Prefix.pch"; path = "TestApp/TestApp-Prefix.pch"; sourceTree = SOURCE_ROOT; }; + 70DAA8FC1908E37C00AF3749 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + 70DAA8FE1908E37C00AF3749 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 70DAA8FF1908E37C00AF3749 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 70DAA91E1908E7CC00AF3749 /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainViewController.xib; sourceTree = ""; }; + 70DAA9201908E80C00AF3749 /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = ""; }; + 70DAA9211908E80C00AF3749 /* config.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = config.xml; sourceTree = ""; }; + 70DAA9241908E82600AF3749 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; + 70DAA9271908E93500AF3749 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; + 70DAA9281908E93500AF3749 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; + 70E382C81909BBFF0029A2F0 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 70BD674A18FF9DAE00A1EFCF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 70DAA8ED1908E37C00AF3749 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 703D32501910CECA0087AC28 /* libCordova.a in Frameworks */, + 70DAA9251908E82600AF3749 /* WebKit.framework in Frameworks */, + 70DAA8F11908E37C00AF3749 /* Cocoa.framework in Frameworks */, + 70E382C91909BBFF0029A2F0 /* SenTestingKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 703D32451910CEB70087AC28 /* Products */ = { + isa = PBXGroup; + children = ( + 703D324B1910CEB70087AC28 /* libCordova.a */, + ); + name = Products; + sourceTree = ""; + }; + 70BD673118FF9DAE00A1EFCF = { + isa = PBXGroup; + children = ( + 70BD675418FF9DAE00A1EFCF /* CordovaLibTests */, + 70BD673C18FF9DAE00A1EFCF /* Frameworks */, + 70BD673B18FF9DAE00A1EFCF /* Products */, + ); + sourceTree = ""; + }; + 70BD673B18FF9DAE00A1EFCF /* Products */ = { + isa = PBXGroup; + children = ( + 70BD674D18FF9DAE00A1EFCF /* CordovaLibTests.octest */, + 70DAA8F01908E37C00AF3749 /* TestApp.app */, + ); + name = Products; + sourceTree = ""; + }; + 70BD673C18FF9DAE00A1EFCF /* Frameworks */ = { + isa = PBXGroup; + children = ( + 703D32441910CEB70087AC28 /* CordovaLib.xcodeproj */, + 70E382C81909BBFF0029A2F0 /* SenTestingKit.framework */, + 70DAA9241908E82600AF3749 /* WebKit.framework */, + 70BD673D18FF9DAE00A1EFCF /* Cocoa.framework */, + 70BD674E18FF9DAE00A1EFCF /* XCTest.framework */, + 70BD673F18FF9DAE00A1EFCF /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 70BD673F18FF9DAE00A1EFCF /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 70BD674018FF9DAE00A1EFCF /* Foundation.framework */, + 70BD674118FF9DAE00A1EFCF /* CoreData.framework */, + 70BD674218FF9DAE00A1EFCF /* AppKit.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 70BD675418FF9DAE00A1EFCF /* CordovaLibTests */ = { + isa = PBXGroup; + children = ( + 70DAA8F21908E37C00AF3749 /* TestApp */, + 70DAA8E81908E07E00AF3749 /* CDVWebViewTest.h */, + 70DAA8E91908E07E00AF3749 /* CDVWebViewTest.m */, + 70718D7F190A4201002ADC5F /* CDVBase64Tests.m */, + 70DAA8E61908E05900AF3749 /* CDVStartPageTests.m */, + 70BD675518FF9DAE00A1EFCF /* Supporting Files */, + ); + name = CordovaLibTests; + sourceTree = ""; + }; + 70BD675518FF9DAE00A1EFCF /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 70BD675618FF9DAE00A1EFCF /* CordovaLibTests-Info.plist */, + 703D32601910D7920087AC28 /* CordovaLibTests-Prefix.pch */, + 70BD675718FF9DAE00A1EFCF /* InfoPlist.strings */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 70DAA8F21908E37C00AF3749 /* TestApp */ = { + isa = PBXGroup; + children = ( + 70DAA9211908E80C00AF3749 /* config.xml */, + 70DAA9201908E80C00AF3749 /* www */, + 70DAA92A1908E99700AF3749 /* Classes */, + 70DAA92B1908E9B400AF3749 /* Supporting Files */, + ); + path = TestApp; + sourceTree = ""; + }; + 70DAA92A1908E99700AF3749 /* Classes */ = { + isa = PBXGroup; + children = ( + 70DAA8FE1908E37C00AF3749 /* AppDelegate.h */, + 70DAA8FF1908E37C00AF3749 /* AppDelegate.m */, + 70DAA9271908E93500AF3749 /* MainViewController.h */, + 70DAA9281908E93500AF3749 /* MainViewController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 70DAA92B1908E9B400AF3749 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 70DAA91E1908E7CC00AF3749 /* MainViewController.xib */, + 70DAA8F41908E37C00AF3749 /* TestApp-Info.plist */, + 70DAA8FA1908E37C00AF3749 /* TestApp-Prefix.pch */, + 70DAA8F51908E37C00AF3749 /* InfoPlist.strings */, + 70DAA8F81908E37C00AF3749 /* main.m */, + 70DAA8FB1908E37C00AF3749 /* Credits.rtf */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 70BD674C18FF9DAE00A1EFCF /* CordovaLibTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 70BD676118FF9DAE00A1EFCF /* Build configuration list for PBXNativeTarget "CordovaLibTests" */; + buildPhases = ( + 70BD674918FF9DAE00A1EFCF /* Sources */, + 70BD674A18FF9DAE00A1EFCF /* Frameworks */, + 70BD674B18FF9DAE00A1EFCF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 703D32641910DA6D0087AC28 /* PBXTargetDependency */, + 703D32621910DA6A0087AC28 /* PBXTargetDependency */, + ); + name = CordovaLibTests; + productName = CordovaLibTests; + productReference = 70BD674D18FF9DAE00A1EFCF /* CordovaLibTests.octest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 70DAA8EF1908E37C00AF3749 /* TestApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 70DAA9171908E37C00AF3749 /* Build configuration list for PBXNativeTarget "TestApp" */; + buildPhases = ( + 70DAA8EC1908E37C00AF3749 /* Sources */, + 70DAA8ED1908E37C00AF3749 /* Frameworks */, + 70DAA8EE1908E37C00AF3749 /* Resources */, + 70718D7E190A3F96002ADC5F /* Copy cordova.js to www direcrtory */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TestApp; + productName = TestApp; + productReference = 70DAA8F01908E37C00AF3749 /* TestApp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 70BD673218FF9DAE00A1EFCF /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0510; + ORGANIZATIONNAME = "Apache Software Foundation"; + TargetAttributes = { + 70BD674C18FF9DAE00A1EFCF = { + TestTargetID = 70DAA8EF1908E37C00AF3749; + }; + }; + }; + buildConfigurationList = 70BD673518FF9DAE00A1EFCF /* Build configuration list for PBXProject "CordovaLibTests" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 70BD673118FF9DAE00A1EFCF; + productRefGroup = 70BD673B18FF9DAE00A1EFCF /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 703D32451910CEB70087AC28 /* Products */; + ProjectRef = 703D32441910CEB70087AC28 /* CordovaLib.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 70BD674C18FF9DAE00A1EFCF /* CordovaLibTests */, + 70DAA8EF1908E37C00AF3749 /* TestApp */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 703D324B1910CEB70087AC28 /* libCordova.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libCordova.a; + remoteRef = 703D324A1910CEB70087AC28 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 70BD674B18FF9DAE00A1EFCF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 70BD675918FF9DAE00A1EFCF /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 70DAA8EE1908E37C00AF3749 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 70DAA9221908E80C00AF3749 /* www in Resources */, + 70DAA8F71908E37C00AF3749 /* InfoPlist.strings in Resources */, + 703D32571910D0C00087AC28 /* MainViewController.xib in Resources */, + 70DAA8FD1908E37C00AF3749 /* Credits.rtf in Resources */, + 70DAA9231908E80C00AF3749 /* config.xml in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 70718D7E190A3F96002ADC5F /* Copy cordova.js to www direcrtory */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy cordova.js to www direcrtory"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cp ../CordovaLib/cordova.js \"$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME/Contents/Resources/www/cordova.js\""; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 70BD674918FF9DAE00A1EFCF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 70DAA8EA1908E07E00AF3749 /* CDVWebViewTest.m in Sources */, + 70718D80190A4201002ADC5F /* CDVBase64Tests.m in Sources */, + 70DAA8E71908E05900AF3749 /* CDVStartPageTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 70DAA8EC1908E37C00AF3749 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 703D32561910D0BA0087AC28 /* MainViewController.m in Sources */, + 703D32581910D0C30087AC28 /* main.m in Sources */, + 703D32551910D0B50087AC28 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 703D32621910DA6A0087AC28 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Cordova; + targetProxy = 703D32611910DA6A0087AC28 /* PBXContainerItemProxy */; + }; + 703D32641910DA6D0087AC28 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 70DAA8EF1908E37C00AF3749 /* TestApp */; + targetProxy = 703D32631910DA6D0087AC28 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 70BD675718FF9DAE00A1EFCF /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 70BD675818FF9DAE00A1EFCF /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 70DAA8F51908E37C00AF3749 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 70DAA8F61908E37C00AF3749 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 70DAA8FB1908E37C00AF3749 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 70DAA8FC1908E37C00AF3749 /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 70BD675C18FF9DAE00A1EFCF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = Cordova; + PUBLIC_HEADERS_FOLDER_PATH = include/Cordova; + SDKROOT = macosx; + }; + name = Debug; + }; + 70BD675D18FF9DAE00A1EFCF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + PRODUCT_NAME = Cordova; + PUBLIC_HEADERS_FOLDER_PATH = include/Cordova; + SDKROOT = macosx; + }; + name = Release; + }; + 70BD676218FF9DAE00A1EFCF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestApp.app/Contents/MacOS/TestApp"; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(DEVELOPER_FRAMEWORKS_DIR)", + "$(inherited)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "CordovaLibTests-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "CordovaLibTests-Info.plist"; + OTHER_LDFLAGS = ( + "-all_load", + "-ObjC", + "-framework", + SenTestingKit, + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + USER_HEADER_SEARCH_PATHS = ""; + WRAPPER_EXTENSION = octest; + }; + name = Debug; + }; + 70BD676318FF9DAE00A1EFCF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestApp.app/Contents/MacOS/TestApp"; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(DEVELOPER_FRAMEWORKS_DIR)", + "$(inherited)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "CordovaLibTests-Prefix.pch"; + INFOPLIST_FILE = "CordovaLibTests-Info.plist"; + OTHER_LDFLAGS = ( + "-all_load", + "-ObjC", + "-framework", + SenTestingKit, + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + USER_HEADER_SEARCH_PATHS = ""; + WRAPPER_EXTENSION = octest; + }; + name = Release; + }; + 70DAA9181908E37C00AF3749 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "TestApp/TestApp-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "$(SRCROOT)/TestApp/TestApp-Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.8; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 70DAA9191908E37C00AF3749 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "TestApp/TestApp-Prefix.pch"; + INFOPLIST_FILE = "$(SRCROOT)/TestApp/TestApp-Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.8; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 70BD673518FF9DAE00A1EFCF /* Build configuration list for PBXProject "CordovaLibTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 70BD675C18FF9DAE00A1EFCF /* Debug */, + 70BD675D18FF9DAE00A1EFCF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 70BD676118FF9DAE00A1EFCF /* Build configuration list for PBXNativeTarget "CordovaLibTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 70BD676218FF9DAE00A1EFCF /* Debug */, + 70BD676318FF9DAE00A1EFCF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 70DAA9171908E37C00AF3749 /* Build configuration list for PBXNativeTarget "TestApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 70DAA9181908E37C00AF3749 /* Debug */, + 70DAA9191908E37C00AF3749 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 70BD673218FF9DAE00A1EFCF /* Project object */; +} http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/TestApp/AppDelegate.h ---------------------------------------------------------------------- diff --git a/CordovaLibTests/TestApp/AppDelegate.h b/CordovaLibTests/TestApp/AppDelegate.h new file mode 100644 index 0000000..546541f --- /dev/null +++ b/CordovaLibTests/TestApp/AppDelegate.h @@ -0,0 +1,32 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +@interface AppDelegate : NSObject { + +} + +@property (nonatomic, strong) IBOutlet CDVViewController* viewController; + +- (void)createViewController: (NSString*) startPage; +- (void)destroyViewController; + +@end http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/TestApp/AppDelegate.m ---------------------------------------------------------------------- diff --git a/CordovaLibTests/TestApp/AppDelegate.m b/CordovaLibTests/TestApp/AppDelegate.m new file mode 100644 index 0000000..787b761 --- /dev/null +++ b/CordovaLibTests/TestApp/AppDelegate.m @@ -0,0 +1,64 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "AppDelegate.h" +#import "MainViewController.h" + +@implementation AppDelegate + + +@synthesize viewController; + +- (id)init{ + self = [super init]; + return self; +} + +- (void)createViewController: (NSString*) startPage { + NSAssert(!self.viewController, @"ViewController already created."); + if (startPage == nil) { + startPage = @"index.html"; + } + self.viewController = [[MainViewController alloc] initWithWindowNibName:@"MainViewController"]; + self.viewController.wwwFolderName = @"www"; + self.viewController.startPage = startPage; + [[self.viewController window] makeKeyAndOrderFront:self]; +} + +- (void)destroyViewController +{ + [self.viewController close]; + self.viewController = nil; +} + +- (void) applicationDidStartLaunching:(NSNotification*) aNotification { +} + +- (void) applicationWillFinishLaunching:(NSNotification*)aNotification{ +} + +- (void) applicationDidFinishLaunching:(NSNotification*)aNotification { + // Create the main view on start-up only when not running unit tests. + if (!NSClassFromString(@"CDVWebViewTest")) { + [self createViewController: nil]; + } +} + + +@end http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/TestApp/MainViewController.h ---------------------------------------------------------------------- diff --git a/CordovaLibTests/TestApp/MainViewController.h b/CordovaLibTests/TestApp/MainViewController.h new file mode 100644 index 0000000..4d02eeb --- /dev/null +++ b/CordovaLibTests/TestApp/MainViewController.h @@ -0,0 +1,32 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import + +@interface MainViewController : CDVViewController + +@end + +@interface MainCommandDelegate : CDVCommandDelegateImpl +@end + +@interface MainCommandQueue : CDVCommandQueue +@end \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/TestApp/MainViewController.m ---------------------------------------------------------------------- diff --git a/CordovaLibTests/TestApp/MainViewController.m b/CordovaLibTests/TestApp/MainViewController.m new file mode 100644 index 0000000..50a866f --- /dev/null +++ b/CordovaLibTests/TestApp/MainViewController.m @@ -0,0 +1,114 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "MainViewController.h" + +@interface MainViewController () + +@end + +@implementation MainViewController + +- (id)initWithWindow:(NSWindow *)window +{ + self = [super initWithWindow:window]; + if (self) { + // Initialization code here. + } + + return self; +} + +- (id)initWithWindowNibName:(NSString*)nibNameOrNil +{ + self = [super initWithWindowNibName:nibNameOrNil]; + if (self) { + // Uncomment to override the CDVCommandDelegateImpl used + // _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self]; + // Uncomment to override the CDVCommandQueue used + // _commandQueue = [[MainCommandQueue alloc] initWithViewController:self]; + } + return self; +} + + +- (id)init +{ + if ((self = [super init])) { + // additional view controller initialization + } + return self; +} + + +- (void)awakeFromNib +{ + [super awakeFromNib]; + + // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. +} + +- (void)orderFrontStandardAboutPanel:(id)sender +{ + [NSApp orderFrontStandardAboutPanel:sender]; +} +@end + +@implementation MainCommandDelegate + +/* To override the methods, uncomment the line in the init function(s) + in MainViewController.m + */ + +#pragma mark CDVCommandDelegate implementation + +- (id)getCommandInstance:(NSString*)className +{ + return [super getCommandInstance:className]; +} + +/* + NOTE: this will only inspect execute calls coming explicitly from native plugins, + not the commandQueue (from JavaScript). To see execute calls from JavaScript, see + MainCommandQueue below + */ +- (BOOL)execute:(CDVInvokedUrlCommand*)command +{ + return [super execute:command]; +} + +- (NSString*)pathForResource:(NSString*)resourcepath; +{ + return [super pathForResource:resourcepath]; +} + +@end + +@implementation MainCommandQueue + +/* To override, uncomment the line in the init function(s) + in MainViewController.m + */ +- (BOOL)execute:(CDVInvokedUrlCommand*)command +{ + return [super execute:command]; +} + +@end + http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/TestApp/MainViewController.xib ---------------------------------------------------------------------- diff --git a/CordovaLibTests/TestApp/MainViewController.xib b/CordovaLibTests/TestApp/MainViewController.xib new file mode 100644 index 0000000..7034d72 --- /dev/null +++ b/CordovaLibTests/TestApp/MainViewController.xib @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/TestApp/TestApp-Info.plist ---------------------------------------------------------------------- diff --git a/CordovaLibTests/TestApp/TestApp-Info.plist b/CordovaLibTests/TestApp/TestApp-Info.plist new file mode 100644 index 0000000..703a91d --- /dev/null +++ b/CordovaLibTests/TestApp/TestApp-Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + org.apache.cordova.osx.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2014 ca.ca.ca. All rights reserved. + NSPrincipalClass + NSApplication + + http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/TestApp/TestApp-Prefix.pch ---------------------------------------------------------------------- diff --git a/CordovaLibTests/TestApp/TestApp-Prefix.pch b/CordovaLibTests/TestApp/TestApp-Prefix.pch new file mode 100644 index 0000000..35d7640 --- /dev/null +++ b/CordovaLibTests/TestApp/TestApp-Prefix.pch @@ -0,0 +1,9 @@ +// +// Prefix header +// +// The contents of this file are implicitly included at the beginning of every source file. +// + +#ifdef __OBJC__ + #import +#endif http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/TestApp/config.xml ---------------------------------------------------------------------- diff --git a/CordovaLibTests/TestApp/config.xml b/CordovaLibTests/TestApp/config.xml new file mode 100644 index 0000000..3598cc9 --- /dev/null +++ b/CordovaLibTests/TestApp/config.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + TestApp + + A sample Apache Cordova application that responds to the deviceready event. + + + Apache Cordova Team + + + + http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/TestApp/en.lproj/Credits.rtf ---------------------------------------------------------------------- diff --git a/CordovaLibTests/TestApp/en.lproj/Credits.rtf b/CordovaLibTests/TestApp/en.lproj/Credits.rtf new file mode 100644 index 0000000..46576ef --- /dev/null +++ b/CordovaLibTests/TestApp/en.lproj/Credits.rtf @@ -0,0 +1,29 @@ +{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} +{\colortbl;\red255\green255\blue255;} +\paperw9840\paperh8400 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\b\fs24 \cf0 Engineering: +\b0 \ + Some people\ +\ + +\b Human Interface Design: +\b0 \ + Some other people\ +\ + +\b Testing: +\b0 \ + Hopefully not nobody\ +\ + +\b Documentation: +\b0 \ + Whoever\ +\ + +\b With special thanks to: +\b0 \ + Mom\ +} http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/TestApp/en.lproj/InfoPlist.strings ---------------------------------------------------------------------- diff --git a/CordovaLibTests/TestApp/en.lproj/InfoPlist.strings b/CordovaLibTests/TestApp/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/CordovaLibTests/TestApp/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/TestApp/en.lproj/MainViewController.strings ---------------------------------------------------------------------- diff --git a/CordovaLibTests/TestApp/en.lproj/MainViewController.strings b/CordovaLibTests/TestApp/en.lproj/MainViewController.strings new file mode 100644 index 0000000..ec530ce --- /dev/null +++ b/CordovaLibTests/TestApp/en.lproj/MainViewController.strings @@ -0,0 +1,390 @@ + +/* Class = "NSMenuItem"; title = "Customize Toolbar…"; ObjectID = "1UK-8n-QPP"; */ +"1UK-8n-QPP.title" = "Customize Toolbar…"; + +/* Class = "NSMenuItem"; title = "TestApp"; ObjectID = "1Xt-HY-uBw"; */ +"1Xt-HY-uBw.title" = "TestApp"; + +/* Class = "NSMenu"; title = "Find"; ObjectID = "1b7-l0-nxx"; */ +"1b7-l0-nxx.title" = "Find"; + +/* Class = "NSMenuItem"; title = "Lower"; ObjectID = "1tx-W0-xDw"; */ +"1tx-W0-xDw.title" = "Lower"; + +/* Class = "NSMenuItem"; title = "Raise"; ObjectID = "2h7-ER-AoG"; */ +"2h7-ER-AoG.title" = "Raise"; + +/* Class = "NSMenuItem"; title = "Transformations"; ObjectID = "2oI-Rn-ZJC"; */ +"2oI-Rn-ZJC.title" = "Transformations"; + +/* Class = "NSMenu"; title = "Spelling"; ObjectID = "3IN-sU-3Bg"; */ +"3IN-sU-3Bg.title" = "Spelling"; + +/* Class = "NSMenuItem"; title = "Use Default"; ObjectID = "3Om-Ey-2VK"; */ +"3Om-Ey-2VK.title" = "Use Default"; + +/* Class = "NSMenu"; title = "Speech"; ObjectID = "3rS-ZA-NoH"; */ +"3rS-ZA-NoH.title" = "Speech"; + +/* Class = "NSMenuItem"; title = "Tighten"; ObjectID = "46P-cB-AYj"; */ +"46P-cB-AYj.title" = "Tighten"; + +/* Class = "NSMenuItem"; title = "Find"; ObjectID = "4EN-yA-p0u"; */ +"4EN-yA-p0u.title" = "Find"; + +/* Class = "NSMenuItem"; title = "Quit TestApp"; ObjectID = "4sb-4s-VLi"; */ +"4sb-4s-VLi.title" = "Quit TestApp"; + +/* Class = "NSMenuItem"; title = "Edit"; ObjectID = "5QF-Oa-p0T"; */ +"5QF-Oa-p0T.title" = "Edit"; + +/* Class = "NSMenuItem"; title = "Copy Style"; ObjectID = "5Vv-lz-BsD"; */ +"5Vv-lz-BsD.title" = "Copy Style"; + +/* Class = "NSMenuItem"; title = "About TestApp"; ObjectID = "5kV-Vb-QxS"; */ +"5kV-Vb-QxS.title" = "About TestApp"; + +/* Class = "NSMenuItem"; title = "Redo"; ObjectID = "6dh-zS-Vam"; */ +"6dh-zS-Vam.title" = "Redo"; + +/* Class = "NSMenuItem"; title = "Correct Spelling Automatically"; ObjectID = "78Y-hA-62v"; */ +"78Y-hA-62v.title" = "Correct Spelling Automatically"; + +/* Class = "NSMenu"; title = "Writing Direction"; ObjectID = "8mr-sm-Yjd"; */ +"8mr-sm-Yjd.title" = "Writing Direction"; + +/* Class = "NSMenuItem"; title = "Substitutions"; ObjectID = "9ic-FL-obx"; */ +"9ic-FL-obx.title" = "Substitutions"; + +/* Class = "NSMenuItem"; title = "Smart Copy/Paste"; ObjectID = "9yt-4B-nSM"; */ +"9yt-4B-nSM.title" = "Smart Copy/Paste"; + +/* Class = "NSMenu"; title = "Main Menu"; ObjectID = "AYu-sK-qS6"; */ +"AYu-sK-qS6.title" = "Main Menu"; + +/* Class = "NSMenuItem"; title = "Preferences…"; ObjectID = "BOF-NM-1cW"; */ +"BOF-NM-1cW.title" = "Preferences…"; + +/* Class = "NSMenuItem"; title = "\tLeft to Right"; ObjectID = "BgM-ve-c93"; */ +"BgM-ve-c93.title" = "\tLeft to Right"; + +/* Class = "NSMenuItem"; title = "Save As…"; ObjectID = "Bw7-FT-i3A"; */ +"Bw7-FT-i3A.title" = "Save As…"; + +/* Class = "NSMenuItem"; title = "Close"; ObjectID = "DVo-aG-piG"; */ +"DVo-aG-piG.title" = "Close"; + +/* Class = "NSMenuItem"; title = "Spelling and Grammar"; ObjectID = "Dv1-io-Yv7"; */ +"Dv1-io-Yv7.title" = "Spelling and Grammar"; + +/* Class = "NSMenu"; title = "Help"; ObjectID = "F2S-fz-NVQ"; */ +"F2S-fz-NVQ.title" = "Help"; + +/* Class = "NSMenuItem"; title = "TestApp Help"; ObjectID = "FKE-Sm-Kum"; */ +"FKE-Sm-Kum.title" = "TestApp Help"; + +/* Class = "NSMenuItem"; title = "Text"; ObjectID = "Fal-I4-PZk"; */ +"Fal-I4-PZk.title" = "Text"; + +/* Class = "NSMenu"; title = "Substitutions"; ObjectID = "FeM-D8-WVr"; */ +"FeM-D8-WVr.title" = "Substitutions"; + +/* Class = "NSMenuItem"; title = "Bold"; ObjectID = "GB9-OM-e27"; */ +"GB9-OM-e27.title" = "Bold"; + +/* Class = "NSMenu"; title = "Format"; ObjectID = "GEO-Iw-cKr"; */ +"GEO-Iw-cKr.title" = "Format"; + +/* Class = "NSMenuItem"; title = "Use Default"; ObjectID = "GUa-eO-cwY"; */ +"GUa-eO-cwY.title" = "Use Default"; + +/* Class = "NSMenuItem"; title = "Font"; ObjectID = "Gi5-1S-RQB"; */ +"Gi5-1S-RQB.title" = "Font"; + +/* Class = "NSMenuItem"; title = "Writing Direction"; ObjectID = "H1b-Si-o9J"; */ +"H1b-Si-o9J.title" = "Writing Direction"; + +/* Class = "NSMenuItem"; title = "View"; ObjectID = "H8h-7b-M4v"; */ +"H8h-7b-M4v.title" = "View"; + +/* Class = "NSMenuItem"; title = "Text Replacement"; ObjectID = "HFQ-gK-NFA"; */ +"HFQ-gK-NFA.title" = "Text Replacement"; + +/* Class = "NSMenuItem"; title = "Show Spelling and Grammar"; ObjectID = "HFo-cy-zxI"; */ +"HFo-cy-zxI.title" = "Show Spelling and Grammar"; + +/* Class = "NSMenu"; title = "View"; ObjectID = "HyV-fh-RgO"; */ +"HyV-fh-RgO.title" = "View"; + +/* Class = "NSMenuItem"; title = "Subscript"; ObjectID = "I0S-gh-46l"; */ +"I0S-gh-46l.title" = "Subscript"; + +/* Class = "NSMenuItem"; title = "Open…"; ObjectID = "IAo-SY-fd9"; */ +"IAo-SY-fd9.title" = "Open…"; + +/* Class = "NSMenuItem"; title = "Justify"; ObjectID = "J5U-5w-g23"; */ +"J5U-5w-g23.title" = "Justify"; + +/* Class = "NSMenuItem"; title = "Use None"; ObjectID = "J7y-lM-qPV"; */ +"J7y-lM-qPV.title" = "Use None"; + +/* Class = "NSMenuItem"; title = "Revert to Saved"; ObjectID = "KaW-ft-85H"; */ +"KaW-ft-85H.title" = "Revert to Saved"; + +/* Class = "NSMenuItem"; title = "Show All"; ObjectID = "Kd2-mp-pUS"; */ +"Kd2-mp-pUS.title" = "Show All"; + +/* Class = "NSMenuItem"; title = "Bring All to Front"; ObjectID = "LE2-aR-0XJ"; */ +"LE2-aR-0XJ.title" = "Bring All to Front"; + +/* Class = "NSMenuItem"; title = "Paste Ruler"; ObjectID = "LVM-kO-fVI"; */ +"LVM-kO-fVI.title" = "Paste Ruler"; + +/* Class = "NSMenuItem"; title = "\tLeft to Right"; ObjectID = "Lbh-J2-qVU"; */ +"Lbh-J2-qVU.title" = "\tLeft to Right"; + +/* Class = "NSMenuItem"; title = "Copy Ruler"; ObjectID = "MkV-Pr-PK5"; */ +"MkV-Pr-PK5.title" = "Copy Ruler"; + +/* Class = "NSMenuItem"; title = "Services"; ObjectID = "NMo-om-nkz"; */ +"NMo-om-nkz.title" = "Services"; + +/* Class = "NSMenuItem"; title = "\tDefault"; ObjectID = "Nop-cj-93Q"; */ +"Nop-cj-93Q.title" = "\tDefault"; + +/* Class = "NSMenuItem"; title = "Minimize"; ObjectID = "OY7-WF-poV"; */ +"OY7-WF-poV.title" = "Minimize"; + +/* Class = "NSMenuItem"; title = "Baseline"; ObjectID = "OaQ-X3-Vso"; */ +"OaQ-X3-Vso.title" = "Baseline"; + +/* Class = "NSMenuItem"; title = "Hide TestApp"; ObjectID = "Olw-nP-bQN"; */ +"Olw-nP-bQN.title" = "Hide TestApp"; + +/* Class = "NSMenuItem"; title = "Find Previous"; ObjectID = "OwM-mh-QMV"; */ +"OwM-mh-QMV.title" = "Find Previous"; + +/* Class = "NSMenuItem"; title = "Stop Speaking"; ObjectID = "Oyz-dy-DGm"; */ +"Oyz-dy-DGm.title" = "Stop Speaking"; + +/* Class = "NSMenuItem"; title = "Bigger"; ObjectID = "Ptp-SP-VEL"; */ +"Ptp-SP-VEL.title" = "Bigger"; + +/* Class = "NSMenuItem"; title = "Show Fonts"; ObjectID = "Q5e-8K-NDq"; */ +"Q5e-8K-NDq.title" = "Show Fonts"; + +/* Class = "NSWindow"; title = "TestApp"; ObjectID = "QvC-M9-y7g"; */ +"QvC-M9-y7g.title" = "TestApp"; + +/* Class = "NSMenuItem"; title = "Zoom"; ObjectID = "R4o-n2-Eq4"; */ +"R4o-n2-Eq4.title" = "Zoom"; + +/* Class = "NSMenuItem"; title = "\tRight to Left"; ObjectID = "RB4-Sm-HuC"; */ +"RB4-Sm-HuC.title" = "\tRight to Left"; + +/* Class = "NSMenuItem"; title = "Superscript"; ObjectID = "Rqc-34-cIF"; */ +"Rqc-34-cIF.title" = "Superscript"; + +/* Class = "NSMenuItem"; title = "Select All"; ObjectID = "Ruw-6m-B2m"; */ +"Ruw-6m-B2m.title" = "Select All"; + +/* Class = "NSMenuItem"; title = "Jump to Selection"; ObjectID = "S0p-oC-mLd"; */ +"S0p-oC-mLd.title" = "Jump to Selection"; + +/* Class = "NSMenu"; title = "Window"; ObjectID = "Td7-aD-5lo"; */ +"Td7-aD-5lo.title" = "Window"; + +/* Class = "NSMenuItem"; title = "Capitalize"; ObjectID = "UEZ-Bs-lqG"; */ +"UEZ-Bs-lqG.title" = "Capitalize"; + +/* Class = "NSMenuItem"; title = "Center"; ObjectID = "VIY-Ag-zcb"; */ +"VIY-Ag-zcb.title" = "Center"; + +/* Class = "NSMenuItem"; title = "Hide Others"; ObjectID = "Vdr-fp-XzO"; */ +"Vdr-fp-XzO.title" = "Hide Others"; + +/* Class = "NSMenuItem"; title = "Italic"; ObjectID = "Vjx-xi-njq"; */ +"Vjx-xi-njq.title" = "Italic"; + +/* Class = "NSMenu"; title = "Edit"; ObjectID = "W48-6f-4Dl"; */ +"W48-6f-4Dl.title" = "Edit"; + +/* Class = "NSMenuItem"; title = "Underline"; ObjectID = "WRG-CD-K1S"; */ +"WRG-CD-K1S.title" = "Underline"; + +/* Class = "NSMenuItem"; title = "New"; ObjectID = "Was-JA-tGl"; */ +"Was-JA-tGl.title" = "New"; + +/* Class = "NSMenuItem"; title = "Paste and Match Style"; ObjectID = "WeT-3V-zwk"; */ +"WeT-3V-zwk.title" = "Paste and Match Style"; + +/* Class = "NSMenuItem"; title = "Find…"; ObjectID = "Xz5-n4-O0W"; */ +"Xz5-n4-O0W.title" = "Find…"; + +/* Class = "NSMenuItem"; title = "Find and Replace…"; ObjectID = "YEy-JH-Tfz"; */ +"YEy-JH-Tfz.title" = "Find and Replace…"; + +/* Class = "NSMenuItem"; title = "\tDefault"; ObjectID = "YGs-j5-SAR"; */ +"YGs-j5-SAR.title" = "\tDefault"; + +/* Class = "NSMenuItem"; title = "Start Speaking"; ObjectID = "Ynk-f8-cLZ"; */ +"Ynk-f8-cLZ.title" = "Start Speaking"; + +/* Class = "NSMenuItem"; title = "Align Left"; ObjectID = "ZM1-6Q-yy1"; */ +"ZM1-6Q-yy1.title" = "Align Left"; + +/* Class = "NSMenuItem"; title = "Paragraph"; ObjectID = "ZvO-Gk-QUH"; */ +"ZvO-Gk-QUH.title" = "Paragraph"; + +/* Class = "NSMenuItem"; title = "Print…"; ObjectID = "aTl-1u-JFS"; */ +"aTl-1u-JFS.title" = "Print…"; + +/* Class = "NSMenuItem"; title = "Window"; ObjectID = "aUF-d1-5bR"; */ +"aUF-d1-5bR.title" = "Window"; + +/* Class = "NSMenu"; title = "Font"; ObjectID = "aXa-aM-Jaq"; */ +"aXa-aM-Jaq.title" = "Font"; + +/* Class = "NSMenuItem"; title = "Use Default"; ObjectID = "agt-UL-0e3"; */ +"agt-UL-0e3.title" = "Use Default"; + +/* Class = "NSMenuItem"; title = "Show Colors"; ObjectID = "bgn-CT-cEk"; */ +"bgn-CT-cEk.title" = "Show Colors"; + +/* Class = "NSMenu"; title = "File"; ObjectID = "bib-Uj-vzu"; */ +"bib-Uj-vzu.title" = "File"; + +/* Class = "NSMenuItem"; title = "Use Selection for Find"; ObjectID = "buJ-ug-pKt"; */ +"buJ-ug-pKt.title" = "Use Selection for Find"; + +/* Class = "NSMenu"; title = "Transformations"; ObjectID = "c8a-y6-VQd"; */ +"c8a-y6-VQd.title" = "Transformations"; + +/* Class = "NSMenuItem"; title = "Use None"; ObjectID = "cDB-IK-hbR"; */ +"cDB-IK-hbR.title" = "Use None"; + +/* Class = "NSMenuItem"; title = "Selection"; ObjectID = "cqv-fj-IhA"; */ +"cqv-fj-IhA.title" = "Selection"; + +/* Class = "NSMenuItem"; title = "Smart Links"; ObjectID = "cwL-P1-jid"; */ +"cwL-P1-jid.title" = "Smart Links"; + +/* Class = "NSMenuItem"; title = "Make Lower Case"; ObjectID = "d9M-CD-aMd"; */ +"d9M-CD-aMd.title" = "Make Lower Case"; + +/* Class = "NSMenu"; title = "Text"; ObjectID = "d9c-me-L2H"; */ +"d9c-me-L2H.title" = "Text"; + +/* Class = "NSMenuItem"; title = "File"; ObjectID = "dMs-cI-mzQ"; */ +"dMs-cI-mzQ.title" = "File"; + +/* Class = "NSMenuItem"; title = "Undo"; ObjectID = "dRJ-4n-Yzg"; */ +"dRJ-4n-Yzg.title" = "Undo"; + +/* Class = "NSMenuItem"; title = "Paste"; ObjectID = "gVA-U4-sdL"; */ +"gVA-U4-sdL.title" = "Paste"; + +/* Class = "NSMenuItem"; title = "Smart Quotes"; ObjectID = "hQb-2v-fYv"; */ +"hQb-2v-fYv.title" = "Smart Quotes"; + +/* Class = "NSMenuItem"; title = "Check Document Now"; ObjectID = "hz2-CU-CR7"; */ +"hz2-CU-CR7.title" = "Check Document Now"; + +/* Class = "NSMenu"; title = "Services"; ObjectID = "hz9-B4-Xy5"; */ +"hz9-B4-Xy5.title" = "Services"; + +/* Class = "NSMenuItem"; title = "Smaller"; ObjectID = "i1d-Er-qST"; */ +"i1d-Er-qST.title" = "Smaller"; + +/* Class = "NSMenu"; title = "Baseline"; ObjectID = "ijk-EB-dga"; */ +"ijk-EB-dga.title" = "Baseline"; + +/* Class = "NSMenuItem"; title = "Kern"; ObjectID = "jBQ-r6-VK2"; */ +"jBQ-r6-VK2.title" = "Kern"; + +/* Class = "NSMenuItem"; title = "\tRight to Left"; ObjectID = "jFq-tB-4Kx"; */ +"jFq-tB-4Kx.title" = "\tRight to Left"; + +/* Class = "NSMenuItem"; title = "Format"; ObjectID = "jxT-CU-nIS"; */ +"jxT-CU-nIS.title" = "Format"; + +/* Class = "NSMenuItem"; title = "Check Grammar With Spelling"; ObjectID = "mK6-2p-4JG"; */ +"mK6-2p-4JG.title" = "Check Grammar With Spelling"; + +/* Class = "NSMenuItem"; title = "Ligatures"; ObjectID = "o6e-r0-MWq"; */ +"o6e-r0-MWq.title" = "Ligatures"; + +/* Class = "NSMenu"; title = "Open Recent"; ObjectID = "oas-Oc-fiZ"; */ +"oas-Oc-fiZ.title" = "Open Recent"; + +/* Class = "NSMenuItem"; title = "Loosen"; ObjectID = "ogc-rX-tC1"; */ +"ogc-rX-tC1.title" = "Loosen"; + +/* Class = "NSMenuItem"; title = "Delete"; ObjectID = "pa3-QI-u2k"; */ +"pa3-QI-u2k.title" = "Delete"; + +/* Class = "NSMenuItem"; title = "Save…"; ObjectID = "pxx-59-PXV"; */ +"pxx-59-PXV.title" = "Save…"; + +/* Class = "NSMenuItem"; title = "Find Next"; ObjectID = "q09-fT-Sye"; */ +"q09-fT-Sye.title" = "Find Next"; + +/* Class = "NSMenuItem"; title = "Page Setup…"; ObjectID = "qIS-W8-SiK"; */ +"qIS-W8-SiK.title" = "Page Setup…"; + +/* Class = "NSMenuItem"; title = "Check Spelling While Typing"; ObjectID = "rbD-Rh-wIN"; */ +"rbD-Rh-wIN.title" = "Check Spelling While Typing"; + +/* Class = "NSMenuItem"; title = "Smart Dashes"; ObjectID = "rgM-f4-ycn"; */ +"rgM-f4-ycn.title" = "Smart Dashes"; + +/* Class = "NSMenuItem"; title = "Show Toolbar"; ObjectID = "snW-S8-Cw5"; */ +"snW-S8-Cw5.title" = "Show Toolbar"; + +/* Class = "NSMenuItem"; title = "Data Detectors"; ObjectID = "tRr-pd-1PS"; */ +"tRr-pd-1PS.title" = "Data Detectors"; + +/* Class = "NSMenuItem"; title = "Open Recent"; ObjectID = "tXI-mr-wws"; */ +"tXI-mr-wws.title" = "Open Recent"; + +/* Class = "NSMenu"; title = "Kern"; ObjectID = "tlD-Oa-oAM"; */ +"tlD-Oa-oAM.title" = "Kern"; + +/* Class = "NSMenu"; title = "TestApp"; ObjectID = "uQy-DD-JDr"; */ +"uQy-DD-JDr.title" = "TestApp"; + +/* Class = "NSMenuItem"; title = "Cut"; ObjectID = "uRl-iY-unG"; */ +"uRl-iY-unG.title" = "Cut"; + +/* Class = "NSMenuItem"; title = "Paste Style"; ObjectID = "vKC-jM-MkH"; */ +"vKC-jM-MkH.title" = "Paste Style"; + +/* Class = "NSMenuItem"; title = "Show Ruler"; ObjectID = "vLm-3I-IUL"; */ +"vLm-3I-IUL.title" = "Show Ruler"; + +/* Class = "NSMenuItem"; title = "Clear Menu"; ObjectID = "vNY-rz-j42"; */ +"vNY-rz-j42.title" = "Clear Menu"; + +/* Class = "NSMenuItem"; title = "Make Upper Case"; ObjectID = "vmV-6d-7jI"; */ +"vmV-6d-7jI.title" = "Make Upper Case"; + +/* Class = "NSMenu"; title = "Ligatures"; ObjectID = "w0m-vy-SC9"; */ +"w0m-vy-SC9.title" = "Ligatures"; + +/* Class = "NSMenuItem"; title = "Align Right"; ObjectID = "wb2-vD-lq4"; */ +"wb2-vD-lq4.title" = "Align Right"; + +/* Class = "NSMenuItem"; title = "Help"; ObjectID = "wpr-3q-Mcd"; */ +"wpr-3q-Mcd.title" = "Help"; + +/* Class = "NSMenuItem"; title = "Copy"; ObjectID = "x3v-GG-iWU"; */ +"x3v-GG-iWU.title" = "Copy"; + +/* Class = "NSMenuItem"; title = "Use All"; ObjectID = "xQD-1f-W4t"; */ +"xQD-1f-W4t.title" = "Use All"; + +/* Class = "NSMenuItem"; title = "Speech"; ObjectID = "xrE-MZ-jX0"; */ +"xrE-MZ-jX0.title" = "Speech"; + +/* Class = "NSMenuItem"; title = "Show Substitutions"; ObjectID = "z6F-FW-3nz"; */ +"z6F-FW-3nz.title" = "Show Substitutions"; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/TestApp/main.m ---------------------------------------------------------------------- diff --git a/CordovaLibTests/TestApp/main.m b/CordovaLibTests/TestApp/main.m new file mode 100644 index 0000000..4e0d8a0 --- /dev/null +++ b/CordovaLibTests/TestApp/main.m @@ -0,0 +1,33 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import "AppDelegate.h" + +static AppDelegate* _appDelegate; + +int main(int argc, const char * argv[]) { + @autoreleasepool { + _appDelegate = [[AppDelegate alloc] init]; + [NSApplication sharedApplication]; + [NSApp setDelegate: _appDelegate]; + [NSApp finishLaunching]; + [NSApp run]; + } +} http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/TestApp/www/index.html ---------------------------------------------------------------------- diff --git a/CordovaLibTests/TestApp/www/index.html b/CordovaLibTests/TestApp/www/index.html new file mode 100644 index 0000000..2aa6e2b --- /dev/null +++ b/CordovaLibTests/TestApp/www/index.html @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + +

Hey, it's Cordova!

+
    +
  1. Check your console log for any white-list rejection errors.
  2. +
  3. Add your allowed hosts in config.xml as access tags and set the origin attribute. (wildcards OK, don't enter the URL scheme)
  4. +
+ + http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/CordovaLibTests/en.lproj/InfoPlist.strings ---------------------------------------------------------------------- diff --git a/CordovaLibTests/en.lproj/InfoPlist.strings b/CordovaLibTests/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/CordovaLibTests/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/bin/create ---------------------------------------------------------------------- diff --git a/bin/create b/bin/create index b924cd9..14950fa 100755 --- a/bin/create +++ b/bin/create @@ -131,8 +131,9 @@ done if [[ $USE_SHARED = 1 ]]; then # Make the sub-project reference to Cordova have the correct path. - "$BINDIR/update_cordova_subproject" "$R.xcodeproj/project.pbxproj" - "${PROJECT_PATH}/${PROJECT_NAME}.xcodeproj/project.pbxproj" > /dev/null + "$BINDIR/update_cordova_subproject" \ + "${PROJECT_PATH}/${PROJECT_NAME}.xcodeproj/project.pbxproj" \ + "${PROJECT_PATH}/CordovaLib/CordovaLib.xcodeproj/project.pbxproj" > /dev/null else # Copy in the CordovaLib directory. cp -r "${CORDOVALIB_DIR}" "${PROJECT_PATH}/" http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b32b674b/bin/tests ---------------------------------------------------------------------- diff --git a/bin/tests b/bin/tests index c08e53d..2bc4715 100755 --- a/bin/tests +++ b/bin/tests @@ -21,7 +21,7 @@ cd $(dirname $0)/.. xcodebuild \ -scheme "TestApp" \ - -project "CordovaLib/CordovaLib.xcodeproj" \ + -project "CordovaLibTests/CordovaLibTests.xcodeproj" \ -configuration "Debug" \ clean build test