You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2013/07/15 18:32:37 UTC

[1/6] ios commit: [CB-4202] [CB-4145] Remove use of useSplashScreen property by unit tests

Updated Branches:
  refs/heads/master 7dcdf69fb -> bcece6fa4


[CB-4202] [CB-4145] Remove use of useSplashScreen property by unit tests


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/bcece6fa
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/bcece6fa
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/bcece6fa

Branch: refs/heads/master
Commit: bcece6fa45afbe5f387e8c2a220ceb3ab180860c
Parents: 8985f6d
Author: Ian Clelland <ic...@chromium.org>
Authored: Mon Jul 15 12:30:56 2013 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Mon Jul 15 12:31:38 2013 -0400

----------------------------------------------------------------------
 CordovaLibTests/CordovaLibApp/AppDelegate.m | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/bcece6fa/CordovaLibTests/CordovaLibApp/AppDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLibTests/CordovaLibApp/AppDelegate.m b/CordovaLibTests/CordovaLibApp/AppDelegate.m
index daee302..065abd4 100644
--- a/CordovaLibTests/CordovaLibApp/AppDelegate.m
+++ b/CordovaLibTests/CordovaLibApp/AppDelegate.m
@@ -41,7 +41,6 @@
     NSAssert(!self.viewController, @"ViewController already created.");
 
     self.viewController = [[ViewController alloc] init];
-    self.viewController.useSplashScreen = YES;
     self.viewController.wwwFolderName = @"www";
     self.viewController.startPage = @"index.html";
 


[3/6] ios commit: [CB-4202] [CB-3681] Remove Contact plugin unit tests

Posted by ia...@apache.org.
[CB-4202] [CB-3681] Remove Contact plugin unit tests


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/b246b4a8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/b246b4a8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/b246b4a8

Branch: refs/heads/master
Commit: b246b4a8964446cff45b7106b132988386d54d30
Parents: 7dcdf69
Author: Ian Clelland <ic...@chromium.org>
Authored: Mon Jul 15 12:27:05 2013 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Mon Jul 15 12:31:38 2013 -0400

----------------------------------------------------------------------
 CordovaLibTests/CDVContactsTests.m              | 60 --------------------
 .../CordovaTests.xcodeproj/project.pbxproj      |  4 --
 2 files changed, 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b246b4a8/CordovaLibTests/CDVContactsTests.m
----------------------------------------------------------------------
diff --git a/CordovaLibTests/CDVContactsTests.m b/CordovaLibTests/CDVContactsTests.m
deleted file mode 100644
index f239bba..0000000
--- a/CordovaLibTests/CDVContactsTests.m
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- 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 <SenTestingKit/SenTestingKit.h>
-
-#import "CDVWebViewTest.h"
-#import "CDVContacts.h"
-
-@interface CDVContactsTests : CDVWebViewTest
-@end
-
-@implementation CDVContactsTests
-
-- (void)setUp
-{
-    [super setUp];
-}
-
-- (void)tearDown
-{
-    [super tearDown];
-}
-
-- (void)testSearchContacts
-{
-    STAssertTrue(NO, @"TODO: testSearchContacts");
-}
-
-- (void)testSaveContact
-{
-    STAssertTrue(NO, @"TODO: testSaveContact");
-}
-
-- (void)testNewContact
-{
-    STAssertTrue(NO, @"TODO: testNewContact");
-}
-
-- (void)testRemoveContact
-{
-    STAssertTrue(NO, @"TODO: testRemoveContact");
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b246b4a8/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj b/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
index 88ac047..acd7bc8 100644
--- a/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
+++ b/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
@@ -17,7 +17,6 @@
 		303A4078152124BB00182201 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 303A4077152124BB00182201 /* AppDelegate.m */; };
 		303A407B152124BB00182201 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 303A407A152124BB00182201 /* ViewController.m */; };
 		3062D1AE151D4D9D000D9128 /* CDVLocalStorageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3062D1AD151D4D9D000D9128 /* CDVLocalStorageTests.m */; };
-		30AE4E8D1419532F005A9C9A /* CDVContactsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 30AE4E8C1419532F005A9C9A /* CDVContactsTests.m */; };
 		30B342F515224B360070E6A5 /* CDVWebViewTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B342F415224B360070E6A5 /* CDVWebViewTest.m */; };
 		30D1B08C15A2B36D0060C291 /* CDVBase64Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 30D1B08B15A2B36D0060C291 /* CDVBase64Tests.m */; };
 		30F8AE0515212587006625B3 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68A32D7414103017006B237C /* AddressBook.framework */; };
@@ -90,7 +89,6 @@
 		303A4079152124BB00182201 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
 		303A407A152124BB00182201 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
 		3062D1AD151D4D9D000D9128 /* CDVLocalStorageTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVLocalStorageTests.m; sourceTree = "<group>"; };
-		30AE4E8C1419532F005A9C9A /* CDVContactsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVContactsTests.m; sourceTree = "<group>"; };
 		30B342F415224B360070E6A5 /* CDVWebViewTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewTest.m; sourceTree = "<group>"; };
 		30D1B08B15A2B36D0060C291 /* CDVBase64Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVBase64Tests.m; sourceTree = "<group>"; };
 		30F8AE1C152129DA006625B3 /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
@@ -266,7 +264,6 @@
 				3062D1AD151D4D9D000D9128 /* CDVLocalStorageTests.m */,
 				686357B9141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m */,
 				30356213141049E1006C2D43 /* CDVWhitelistTests.m */,
-				30AE4E8C1419532F005A9C9A /* CDVContactsTests.m */,
 				686357B1141002F200DF4CF2 /* Supporting Files */,
 			);
 			name = CordovaLibTests;
@@ -429,7 +426,6 @@
 			files = (
 				3035621714104C34006C2D43 /* CDVWhitelistTests.m in Sources */,
 				686357BA141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m in Sources */,
-				30AE4E8D1419532F005A9C9A /* CDVContactsTests.m in Sources */,
 				3062D1AE151D4D9D000D9128 /* CDVLocalStorageTests.m in Sources */,
 				30B342F515224B360070E6A5 /* CDVWebViewTest.m in Sources */,
 				30D1B08C15A2B36D0060C291 /* CDVBase64Tests.m in Sources */,


[2/6] ios commit: [CB-4202] [CB-3973] Remove unit test dependency on Dialogs plugin

Posted by ia...@apache.org.
[CB-4202] [CB-3973] Remove unit test dependency on Dialogs plugin


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/a37785b1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/a37785b1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/a37785b1

Branch: refs/heads/master
Commit: a37785b10d1b429c46881fea8bc147434b92108d
Parents: 9fb953d
Author: Ian Clelland <ic...@chromium.org>
Authored: Mon Jul 15 12:29:34 2013 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Mon Jul 15 12:31:38 2013 -0400

----------------------------------------------------------------------
 CordovaLibTests/CordovaLibApp/www/index.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a37785b1/CordovaLibTests/CordovaLibApp/www/index.html
----------------------------------------------------------------------
diff --git a/CordovaLibTests/CordovaLibApp/www/index.html b/CordovaLibTests/CordovaLibApp/www/index.html
index 17f1319..7f8bc5a 100644
--- a/CordovaLibTests/CordovaLibApp/www/index.html
+++ b/CordovaLibTests/CordovaLibApp/www/index.html
@@ -69,7 +69,7 @@
     // Used by unit tests to tell when the page is loaded.
     window.pageIsLoaded = true;
 		// do your thing!
-		navigator.notification.alert("Cordova is working")        
+		console.log("Cordova is working")
 	}
     
     </script>


[6/6] ios commit: [CB-4202] [CB-3726] Remove File Transfer plugin unit tests

Posted by ia...@apache.org.
[CB-4202] [CB-3726] Remove File Transfer plugin unit tests


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/9fb953d5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/9fb953d5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/9fb953d5

Branch: refs/heads/master
Commit: 9fb953d58b97e136deb73c32bb897415c6cae413
Parents: a7d8a16
Author: Ian Clelland <ic...@chromium.org>
Authored: Mon Jul 15 12:28:43 2013 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Mon Jul 15 12:31:38 2013 -0400

----------------------------------------------------------------------
 CordovaLibTests/CDVFileTransferTests.m          | 218 -------------------
 .../CordovaTests.xcodeproj/project.pbxproj      |   4 -
 2 files changed, 222 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/9fb953d5/CordovaLibTests/CDVFileTransferTests.m
----------------------------------------------------------------------
diff --git a/CordovaLibTests/CDVFileTransferTests.m b/CordovaLibTests/CDVFileTransferTests.m
deleted file mode 100644
index 2effc98..0000000
--- a/CordovaLibTests/CDVFileTransferTests.m
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- 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 <SenTestingKit/SenTestingKit.h>
-
-#import "CDV.h"
-#import "CDVCommandDelegateImpl.h"
-
-static NSString* const kDummyArgCallbackId = @"cid0";
-static NSString* const kDummyArgFileKey = @"image.jpg";
-static NSString* const kDummyArgTarget = @"/path/to/image.jpg";
-static NSString* const kDummyArgServer = @"http://apache.org";
-static NSString* const kDummyFileContents = @"0123456789";
-
-// Reads the given stream and returns the contents as an NSData.
-static NSData *readStream(NSInputStream* stream)
-{
-    static const NSUInteger kBufferSize = 1024;
-
-    UInt8* buffer = malloc(kBufferSize);
-    NSMutableData* streamData = [NSMutableData data];
-
-    [stream open];
-
-    for (;; ) {
-        NSInteger read = [stream read:buffer maxLength:kBufferSize];
-        if (read > 0) {
-            [streamData appendBytes:buffer length:read];
-        } else {
-            break;
-        }
-    }
-
-    free(buffer);
-    [stream close];
-    return streamData;
-}
-
-@interface CDVFileTransferTests : SenTestCase {
-    NSMutableArray* _arguments;
-    CDVFileTransfer* _fileTransfer;
-    NSData* _dummyFileData;
-    CDVCommandDelegateImpl* _commandDelegate;
-}
-@end
-
-@implementation CDVFileTransferTests
-
-- (void)setUp
-{
-    [super setUp];
-
-    _arguments = [[NSMutableArray alloc] initWithObjects:
-        kDummyArgTarget, kDummyArgServer, kDummyArgFileKey, [NSNull null],
-        [NSNull null], [NSNull null], [NSNull null], [NSNull null], [NSNull null], nil];
-    _dummyFileData = [kDummyFileContents dataUsingEncoding:NSUTF8StringEncoding];
-    _commandDelegate = [[CDVCommandDelegateImpl alloc] initWithViewController:nil];
-    _fileTransfer = [[CDVFileTransfer alloc] init];
-    _fileTransfer.commandDelegate = _commandDelegate;
-}
-
-- (void)tearDown
-{
-    _arguments = nil;
-    _dummyFileData = nil;
-    _fileTransfer = nil;
-    _commandDelegate = nil;
-    [super tearDown];
-}
-
-- (void)setFilePathArg:(NSString*)filePath
-{
-    [_arguments replaceObjectAtIndex:0 withObject:filePath];
-}
-
-- (void)setServerUrlArg:(NSString*)serverUrl
-{
-    [_arguments replaceObjectAtIndex:1 withObject:serverUrl];
-}
-
-- (void)setChunkedModeArg:(BOOL)chunk
-{
-    [_arguments replaceObjectAtIndex:7 withObject:[NSNumber numberWithBool:chunk]];
-}
-
-- (void)setParams:(NSDictionary*)params
-{
-    [_arguments replaceObjectAtIndex:5 withObject:params];
-}
-
-- (void)setHeaders:(NSDictionary*)headers
-{
-    [_arguments replaceObjectAtIndex:8 withObject:headers];
-}
-
-- (NSURLRequest*)requestForUpload
-{
-    CDVInvokedUrlCommand* command = [[CDVInvokedUrlCommand alloc] initWithArguments:_arguments
-                                                                         callbackId:kDummyArgCallbackId
-                                                                          className:@"FileTransfer"
-                                                                         methodName:@"upload"];
-
-    return [_fileTransfer requestForUploadCommand:command fileData:_dummyFileData];
-}
-
-- (void)checkUploadRequest:(NSURLRequest*)request chunked:(BOOL)chunked
-{
-    STAssertTrue([@"POST" isEqualToString:[request HTTPMethod]], nil);
-    NSData* payloadData = nil;
-    if (chunked) {
-        STAssertNil([request HTTPBody], nil);
-        STAssertNotNil([request HTTPBodyStream], nil);
-        payloadData = readStream([request HTTPBodyStream]);
-    } else {
-        STAssertNotNil([request HTTPBody], nil);
-        STAssertNil([request HTTPBodyStream], nil);
-        payloadData = [request HTTPBody];
-    }
-    STAssertNotNil([request valueForHTTPHeaderField:@"X-Requested-With"], nil);
-    NSUInteger contentLength = [[request valueForHTTPHeaderField:@"Content-Length"] intValue];
-    STAssertEquals([payloadData length], contentLength, nil);
-}
-
-- (void)testEscapePathComponentForUrlString
-{
-    STAssertTrue([@"" isEqualToString:
-        [_fileTransfer escapePathComponentForUrlString:@""]], nil);
-    STAssertTrue([@"foo" isEqualToString:
-        [_fileTransfer escapePathComponentForUrlString:@"foo"]], nil);
-    STAssertTrue([@"http://a.org/spa%20ce%25" isEqualToString:
-        [_fileTransfer escapePathComponentForUrlString:@"http://a.org/spa ce%"]], nil);
-    STAssertTrue([@"http://a.org/spa%20ce%25/" isEqualToString:
-        [_fileTransfer escapePathComponentForUrlString:@"http://a.org/spa ce%/"]], nil);
-    STAssertTrue([@"http://a.org/%25/%25/" isEqualToString:
-        [_fileTransfer escapePathComponentForUrlString:@"http://a.org/%/%/"]], nil);
-}
-
-- (void)testUpload_invalidServerUrl
-{
-    [self setServerUrlArg:@"invalid url"];
-    STAssertNil([self requestForUpload], nil);
-}
-
-- (void)testUpload_missingFileData
-{
-    _dummyFileData = nil;
-    STAssertNil([self requestForUpload], nil);
-}
-
-- (void)testUpload_serverUrlPathEscaping
-{
-    [self setServerUrlArg:[_fileTransfer escapePathComponentForUrlString:@"http://apache.org/spa ce%"]]; // uri encode first now
-    NSURLRequest* request = [self requestForUpload];
-    STAssertTrue([[[request URL] absoluteString] isEqualToString:@"http://apache.org/spa%20ce%25"], nil);
-}
-
-- (void)testUpload_nonChunked
-{
-    [self setChunkedModeArg:NO];
-    NSURLRequest* request = [self requestForUpload];
-    [self checkUploadRequest:request chunked:NO];
-}
-
-- (void)testUpload_chunked
-{
-    // As noted in the implementation, chunked upload is disabled pre 5.0.
-    if (!IsAtLeastiOSVersion(@"5.0")) {
-        return;
-    }
-    // Chunked is the default.
-    NSURLRequest* request = [self requestForUpload];
-    [self checkUploadRequest:request chunked:YES];
-}
-
-- (void)testUpload_withParams
-{
-    [self setChunkedModeArg:NO];
-    NSDictionary* params = [NSDictionary dictionaryWithObjectsAndKeys:@"cookieval", kOptionsKeyCookie,
-        @"val3", @"key3", nil];
-    [self setParams:params];
-    NSURLRequest* request = [self requestForUpload];
-    NSString* payload = [[NSString alloc] initWithData:[request HTTPBody] encoding:NSUTF8StringEncoding];
-    // Check that the cookie is set, and that it is not in the payload like others in the options dict.
-    STAssertTrue([@"cookieval" isEqualToString:[request valueForHTTPHeaderField:@"Cookie"]], nil);
-    STAssertEquals([payload rangeOfString:@"cookieval"].length, 0U, nil);
-    // Check that key3 is in the payload.
-    STAssertTrue([payload rangeOfString:@"key3"].length > 0, nil);
-    STAssertTrue([payload rangeOfString:@"val3"].length > 0, nil);
-}
-
-- (void)testUpload_withHeaders
-{
-    [self setChunkedModeArg:NO];
-    [self setHeaders:[NSDictionary dictionaryWithObjectsAndKeys:@"val1", @"key1",
-    [NSArray arrayWithObjects:@"val2a", @"val2b", nil], @"key2", [NSNull null], @"X-Requested-With", nil]];
-    NSURLRequest* request = [self requestForUpload];
-    STAssertTrue([@"val1" isEqualToString:[request valueForHTTPHeaderField:@"key1"]], nil);
-    STAssertTrue([@"val2a,val2b" isEqualToString:[request valueForHTTPHeaderField:@"key2"]], nil);
-    STAssertTrue([@"null" isEqualToString:[request valueForHTTPHeaderField:@"X-Requested-With"]], nil);
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/9fb953d5/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj b/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
index 5de43de..05480e4 100644
--- a/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
+++ b/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
@@ -48,7 +48,6 @@
 		EB89634A15FE66EA00E12277 /* CDVInvokedUrlCommandTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EB89634915FE66EA00E12277 /* CDVInvokedUrlCommandTests.m */; };
 		EB96677216ADBCF500D86CDF /* CDVUserAgentTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EB96677116ADBCF500D86CDF /* CDVUserAgentTest.m */; };
 		EBA3554615A731F100F4DE24 /* CDVFakeFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA3554515A731F100F4DE24 /* CDVFakeFileManager.m */; };
-		EBA3556F15ABD0C900F4DE24 /* CDVFileTransferTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA3556E15ABD0C900F4DE24 /* CDVFileTransferTests.m */; };
 		F8EB14D1165FFD3200616F39 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = F8EB14D0165FFD3200616F39 /* config.xml */; };
 /* End PBXBuildFile section */
 
@@ -114,7 +113,6 @@
 		EBA3550F15A5F18900F4DE24 /* CDVWebViewTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDVWebViewTest.h; sourceTree = "<group>"; };
 		EBA3554415A731F100F4DE24 /* CDVFakeFileManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVFakeFileManager.h; sourceTree = "<group>"; };
 		EBA3554515A731F100F4DE24 /* CDVFakeFileManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVFakeFileManager.m; sourceTree = "<group>"; };
-		EBA3556E15ABD0C900F4DE24 /* CDVFileTransferTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVFileTransferTests.m; sourceTree = "<group>"; };
 		F8EB14D0165FFD3200616F39 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = CordovaLibApp/config.xml; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
@@ -254,7 +252,6 @@
 				EBA3550F15A5F18900F4DE24 /* CDVWebViewTest.h */,
 				30B342F415224B360070E6A5 /* CDVWebViewTest.m */,
 				30D1B08B15A2B36D0060C291 /* CDVBase64Tests.m */,
-				EBA3556E15ABD0C900F4DE24 /* CDVFileTransferTests.m */,
 				EB89634915FE66EA00E12277 /* CDVInvokedUrlCommandTests.m */,
 				3062D1AD151D4D9D000D9128 /* CDVLocalStorageTests.m */,
 				686357B9141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m */,
@@ -425,7 +422,6 @@
 				30B342F515224B360070E6A5 /* CDVWebViewTest.m in Sources */,
 				30D1B08C15A2B36D0060C291 /* CDVBase64Tests.m in Sources */,
 				EBA3554615A731F100F4DE24 /* CDVFakeFileManager.m in Sources */,
-				EBA3556F15ABD0C900F4DE24 /* CDVFileTransferTests.m in Sources */,
 				EB89634A15FE66EA00E12277 /* CDVInvokedUrlCommandTests.m in Sources */,
 				EB96677216ADBCF500D86CDF /* CDVUserAgentTest.m in Sources */,
 				7E91406017711D88002C6A3F /* CDVWebViewDelegateTests.m in Sources */,


[4/6] ios commit: [CB-4202] [CB-3653] Remove EXIF (Camera plugin) unit tests

Posted by ia...@apache.org.
[CB-4202] [CB-3653] Remove EXIF (Camera plugin) unit tests


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/a7d8a166
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/a7d8a166
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/a7d8a166

Branch: refs/heads/master
Commit: a7d8a166888c743031047f0a68b86e037f1ef791
Parents: b246b4a
Author: Ian Clelland <ic...@chromium.org>
Authored: Mon Jul 15 12:28:04 2013 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Mon Jul 15 12:31:38 2013 -0400

----------------------------------------------------------------------
 CordovaLibTests/CDVExifTests.h                  |  38 -----
 CordovaLibTests/CDVExifTests.m                  | 171 -------------------
 .../CordovaTests.xcodeproj/project.pbxproj      |   6 -
 3 files changed, 215 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7d8a166/CordovaLibTests/CDVExifTests.h
----------------------------------------------------------------------
diff --git a/CordovaLibTests/CDVExifTests.h b/CordovaLibTests/CDVExifTests.h
deleted file mode 100644
index 2f41c4c..0000000
--- a/CordovaLibTests/CDVExifTests.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- 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 <SenTestingKit/SenTestingKit.h>
-
-#import <Cordova/CDVJpegHeaderWriter.h>
-
-#define ARC4RANDOM_MAX 0x100000000
-
-@interface CDVExifTests : SenTestCase {
-    CDVJpegHeaderWriter* testHeaderWriter;
-    NSNumber* testErrorThreshhold;
-}
-
-- (void)testContinuedFractionWithUInt;
-- (void)testContinuedFractionWithUFloat;
-- (void)testContinuedFractionsWorstCase;
-- (void)testFormatHexFromDecimal;
-- (void)testFormatNumberWithLeadingZeroes;
-- (void)testUnsignedRationalToString;
-- (void)testSignedRationalToString;
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7d8a166/CordovaLibTests/CDVExifTests.m
----------------------------------------------------------------------
diff --git a/CordovaLibTests/CDVExifTests.m b/CordovaLibTests/CDVExifTests.m
deleted file mode 100644
index aa456c8..0000000
--- a/CordovaLibTests/CDVExifTests.m
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- 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 <SenTestingKit/SenTestingKit.h>
-
-#import "CDVExifTests.h"
-
-@implementation CDVExifTests
-
-- (void)setUp
-{
-    [super setUp];
-    testHeaderWriter = [[CDVJpegHeaderWriter alloc] init];
-    testErrorThreshhold = [NSNumber numberWithDouble:0.000001];
-    NSLog(@"%x", ~10 + 1);
-}
-
-- (void)tearDown
-{
-    // Tear-down code here.
-
-    [super tearDown];
-}
-
-// ==================================================================================================
-// rational approximation of decimal by continued fraction tests
-// ==================================================================================================
-
-// tests continued fraction with random int
-- (void)testContinuedFractionWithUInt
-{
-    NSLog(@"Continued Fraction Test with random int value, numerator should be generated value, denominator should be 1");
-    NSNumber* numerator = @0;
-    NSNumber* denominator = @0;
-    NSNumber* testValue = [NSNumber numberWithInt:abs(arc4random())];
-    [testHeaderWriter decimalToUnsignedRational:testValue
-                            withResultNumerator:&numerator
-                          withResultDenominator:&denominator];
-    STAssertEquals([numerator intValue],
-        [testValue intValue],
-        @"Numerator did not match");
-    STAssertEquals([denominator intValue],
-        1,
-        @"denominator was not one");
-}
-
-// tests continued fraction with random float
-- (void)testContinuedFractionWithUFloat
-{
-    NSLog(@"Continued Fraction Test with random double value, resulting fraction should be within acceptable error threshhold");
-    NSNumber* threshhold = @0.1;
-    NSNumber* numerator = @0;
-    NSNumber* denominator = @0;
-    NSLog(@"%f", ((double)arc4random() / ARC4RANDOM_MAX) * 100.0f);
-    NSNumber* testValue = [NSNumber numberWithDouble:
-        ((double)arc4random() / ARC4RANDOM_MAX) * 100.0f];
-
-    [testHeaderWriter decimalToUnsignedRational:testValue
-                            withResultNumerator:&numerator
-                          withResultDenominator:&denominator];
-    NSLog(@"%lf, %lf", [testValue doubleValue], [numerator doubleValue] / [denominator doubleValue]);
-
-    STAssertEqualsWithAccuracy([testValue doubleValue],
-        [numerator doubleValue] / [denominator doubleValue],
-        [threshhold doubleValue],
-        @"rational approximation did not meet acceptable error threshhold");
-}
-
-// tests continued fraction in sqrt(2) worst case
-- (void)testContinuedFractionsWorstCase
-{
-    NSLog(@"Continued Fraction Test with provable worst case ~sqrt(2), resulting fraction should be within acceptable error threshhold");
-    NSNumber* threshhold = @0.1;
-    NSNumber* numerator = @0;
-    NSNumber* denominator = @0;
-    NSNumber* testValue = [NSNumber numberWithDouble:sqrt(2)];
-    [testHeaderWriter decimalToUnsignedRational:testValue
-                            withResultNumerator:&numerator
-                          withResultDenominator:&denominator];
-    STAssertEqualsWithAccuracy([testValue doubleValue],
-        [numerator doubleValue] / [denominator doubleValue],
-        [threshhold doubleValue],
-        @"rational approximation did not meet acceptable error threshhold");
-}
-
-// tests format hex from a decimal
-- (void)testFormatHexFromDecimal
-{
-    NSNumber* testValue = @1;
-    NSNumber* testPlaces = @8;
-    NSString* result = nil;
-
-    result = [testHeaderWriter formattedHexStringFromDecimalNumber:testValue
-                                                        withPlaces:testPlaces];
-    // assert not nil
-    STAssertNotNil(result, @"nil renturned from formattedHexStringFromDecimalNumber");
-    // assert correct number of places
-    STAssertEquals([result length], [testPlaces unsignedIntegerValue],
-        @"returned string to wrong number of places. Should be = %i Was = %i",
-        [testPlaces intValue],
-        [result length]);
-    // assert correct hex representation
-    STAssertTrueNoThrow([result isEqualToString:@"00000001"], @"result should be equal to @00000001");
-}
-
-// tests format number string with leading zeroes
-- (void)testFormatNumberWithLeadingZeroes
-{
-    NSString* result = nil;
-    NSNumber* testValue = @8769;  // Exif SubIFD Offset Tag
-    NSNumber* testPlaces = @6;
-
-    result = [testHeaderWriter formatNumberWithLeadingZeroes:testValue
-                                                  withPlaces:testPlaces];
-    STAssertNotNil(result, @"nil renturned from formattedHexStringFromDecimalNumber");
-    STAssertEquals([result length],
-        [testPlaces unsignedIntegerValue],
-        @"returned string to wrong number of places. Should be = %i Was = %i",
-        [testPlaces intValue],
-        [result length]);
-    // assert correct hex representation
-    STAssertTrueNoThrow([result isEqualToString:@"008769"], @"result was = %@ should be = @008769", result);
-}
-
-- (void)testUnsignedRationalToString
-{
-    NSString* result = nil;
-    NSNumber* numerator = @1;
-    NSNumber* denominator = @10;
-
-    result = [testHeaderWriter formatRationalWithNumerator:numerator
-                                           withDenominator:denominator
-                                                  asSigned:FALSE];
-    NSLog(@"%@", result);
-    STAssertNotNil(result, @"nil returned from testUnsignedRationalToString");
-    STAssertTrueNoThrow([result length] == 16, @"returned string with wrong length. Exif rationals are 8 bytes, string has %ld bytes", [result length] / 2);
-    STAssertTrueNoThrow([result isEqualToString:@"000000010000000a"], @"result was = %@ should be = @0000000100000010", result);
-}
-
-- (void)testSignedRationalToString
-{
-    NSString* result = nil;
-    NSNumber* numerator = @ - 1;
-    NSNumber* denominator = @ - 10;
-
-    result = [testHeaderWriter formatRationalWithNumerator:numerator
-                                           withDenominator:denominator
-                                                  asSigned:TRUE];
-    NSLog(@"%@", result);
-    STAssertNotNil(result, @"nil returned from testSignedRationalToString");
-    STAssertTrueNoThrow([result length] == 16, @"returned string with wrong length. Exif rationals are 8 bytes, string has %ld bytes", [result length] / 2);
-    STAssertTrueNoThrow([result isEqualToString:@"fffffffffffffff6"], @"result was = %@ should be = @000000FF000000F6", result);
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a7d8a166/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj b/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
index acd7bc8..5de43de 100644
--- a/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
+++ b/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
@@ -41,7 +41,6 @@
 		68A32D7D141030E4006B237C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357AE141002F100DF4CF2 /* CoreGraphics.framework */; };
 		68A32D7E141030EB006B237C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357AA141002F100DF4CF2 /* UIKit.framework */; };
 		68A32D7F141030F3006B237C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357AC141002F100DF4CF2 /* Foundation.framework */; };
-		7E13A295175D487B00E522AB /* CDVExifTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E13A294175D487B00E522AB /* CDVExifTests.m */; };
 		7E91406017711D88002C6A3F /* CDVWebViewDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E91405F17711D88002C6A3F /* CDVWebViewDelegateTests.m */; };
 		8220B5C216D541BD00EC3921 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8220B5C116D541BD00EC3921 /* AssetsLibrary.framework */; };
 		8220B5C616D542F500EC3921 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8220B5C116D541BD00EC3921 /* AssetsLibrary.framework */; };
@@ -107,8 +106,6 @@
 		686357D414100AF200DF4CF2 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
 		686357DC14100B1600DF4CF2 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
 		68A32D7414103017006B237C /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		7E13A293175D487B00E522AB /* CDVExifTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVExifTests.h; sourceTree = "<group>"; };
-		7E13A294175D487B00E522AB /* CDVExifTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVExifTests.m; sourceTree = "<group>"; };
 		7E91405F17711D88002C6A3F /* CDVWebViewDelegateTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewDelegateTests.m; sourceTree = "<group>"; };
 		8220B5C116D541BD00EC3921 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
 		EB37018115D18B2D00BEBC43 /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = ../CordovaLib/CordovaLib.xcodeproj; sourceTree = "<group>"; };
@@ -251,8 +248,6 @@
 			isa = PBXGroup;
 			children = (
 				7E91405F17711D88002C6A3F /* CDVWebViewDelegateTests.m */,
-				7E13A293175D487B00E522AB /* CDVExifTests.h */,
-				7E13A294175D487B00E522AB /* CDVExifTests.m */,
 				EB96677116ADBCF500D86CDF /* CDVUserAgentTest.m */,
 				EBA3554415A731F100F4DE24 /* CDVFakeFileManager.h */,
 				EBA3554515A731F100F4DE24 /* CDVFakeFileManager.m */,
@@ -433,7 +428,6 @@
 				EBA3556F15ABD0C900F4DE24 /* CDVFileTransferTests.m in Sources */,
 				EB89634A15FE66EA00E12277 /* CDVInvokedUrlCommandTests.m in Sources */,
 				EB96677216ADBCF500D86CDF /* CDVUserAgentTest.m in Sources */,
-				7E13A295175D487B00E522AB /* CDVExifTests.m in Sources */,
 				7E91406017711D88002C6A3F /* CDVWebViewDelegateTests.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;


[5/6] ios commit: [CB-4202] [CB-1107] Remove unit tests for old plugin signature

Posted by ia...@apache.org.
[CB-4202] [CB-1107] Remove unit tests for old plugin signature


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/8985f6d0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/8985f6d0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/8985f6d0

Branch: refs/heads/master
Commit: 8985f6d0b9a91d1670c3455a4039020e32b65f65
Parents: a37785b
Author: Ian Clelland <ic...@chromium.org>
Authored: Mon Jul 15 12:30:13 2013 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Mon Jul 15 12:31:38 2013 -0400

----------------------------------------------------------------------
 CordovaLibTests/CDVInvokedUrlCommandTests.m | 56 ------------------------
 1 file changed, 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8985f6d0/CordovaLibTests/CDVInvokedUrlCommandTests.m
----------------------------------------------------------------------
diff --git a/CordovaLibTests/CDVInvokedUrlCommandTests.m b/CordovaLibTests/CDVInvokedUrlCommandTests.m
index cdaff0b..b939fc2 100644
--- a/CordovaLibTests/CDVInvokedUrlCommandTests.m
+++ b/CordovaLibTests/CDVInvokedUrlCommandTests.m
@@ -37,62 +37,6 @@
     STAssertEquals([NSArray array], command.arguments, nil);
 }
 
-- (void)testLegacyArgsNoDict
-{
-    NSArray* args = [NSArray arrayWithObjects:@"a", @"b", nil];
-    NSArray* jsonArr = [NSArray arrayWithObjects:@"callbackId", @"className", @"methodName", args, nil];
-    CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonArr];
-    NSMutableArray* legacyArgs = nil;
-    NSMutableDictionary* dict = nil;
-
-    [command legacyArguments:&legacyArgs andDict:&dict];
-    // Ensure properties don't change.
-    STAssertEquals(@"callbackId", command.callbackId, nil);
-    STAssertEquals(@"className", command.className, nil);
-    STAssertEquals(@"methodName", command.methodName, nil);
-    STAssertEquals(args, command.arguments, nil);
-
-    NSArray* expected = [NSArray arrayWithObjects:@"callbackId", @"a", @"b", nil];
-    STAssertEqualObjects(expected, legacyArgs, nil);
-    STAssertNil(dict, nil);
-}
-
-- (void)testLegacyArgsWithDicts
-{
-    NSDictionary* dummyDict1 = [NSDictionary dictionaryWithObjectsAndKeys:@"val", @"key", nil];
-    NSDictionary* dummyDict2 = [NSDictionary dictionaryWithObjectsAndKeys:@"val", @"key", nil];
-    NSArray* args = [NSArray arrayWithObjects:@"a", dummyDict1, dummyDict2, @"b", nil];
-    NSArray* jsonArr = [NSArray arrayWithObjects:@"callbackId", @"className", @"methodName", args, nil];
-    CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonArr];
-    NSMutableArray* legacyArgs = nil;
-    NSMutableDictionary* dict = nil;
-
-    [command legacyArguments:&legacyArgs andDict:&dict];
-    // Ensure properties don't change.
-    STAssertEquals(@"callbackId", command.callbackId, nil);
-    STAssertEquals(@"className", command.className, nil);
-    STAssertEquals(@"methodName", command.methodName, nil);
-    STAssertEquals(args, command.arguments, nil);
-
-    NSArray* expected = [NSArray arrayWithObjects:@"callbackId", @"a", dummyDict2, @"b", nil];
-    STAssertEqualObjects(expected, legacyArgs, nil);
-    STAssertEqualObjects(dict, dummyDict1, nil);
-}
-
-- (void)testLegacyArgsNoCallbackId
-{
-    NSArray* args = [NSArray arrayWithObjects:@"a", @"b", nil];
-    NSArray* jsonArr = [NSArray arrayWithObjects:[NSNull null], @"className", @"methodName", args, nil];
-    CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonArr];
-    NSMutableArray* legacyArgs = nil;
-    NSMutableDictionary* dict = nil;
-
-    [command legacyArguments:&legacyArgs andDict:&dict];
-
-    NSArray* expected = [NSArray arrayWithObjects:@"a", @"b", nil];
-    STAssertEqualObjects(expected, legacyArgs, nil);
-}
-
 - (void)testArgumentAtIndex
 {
     NSArray* jsonArr = [NSArray arrayWithObjects:[NSNull null], @"className", @"methodName", [NSArray array], nil];