cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [5/11] spec commit: [CB-2213] Added a test for getParent.
Date Tue, 12 Feb 2013 03:15:59 GMT
[CB-2213] Added a test for getParent.


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

Branch: refs/heads/master
Commit: c5311ea241924120d1a2f1453a59a614cc1f8f1f
Parents: f1b2807
Author: Max Woghiren <max.woghiren@gmail.com>
Authored: Fri Jan 18 14:06:41 2013 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Mon Feb 11 21:19:34 2013 -0500

----------------------------------------------------------------------
 camera/index.html |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/c5311ea2/camera/index.html
----------------------------------------------------------------------
diff --git a/camera/index.html b/camera/index.html
index 989d71e..aef0b14 100644
--- a/camera/index.html
+++ b/camera/index.html
@@ -125,6 +125,14 @@
             document.getElementById('camera_status').innerHTML += "FileEntry.remove <b>success</b>
(failed as expected): " + e.code + "<br />"
         };
 
+        var onParentReceived = function() {
+            document.getElementById('camera_status').innerHTML += "FileEntry.getParent <b>error</b>:
getParent succeeded when it should fail<br />";
+        };
+
+        var onGetParentError = function(e) {
+            document.getElementById('camera_status').innerHTML += "FileEntry.getParent <b>success</b>
(failed as expected): " + e.code + "<br />"
+        };
+
         var onFileReadAsText = function(evt) {
             document.getElementById('camera_status').innerHTML += "FileReader.readAsText
<b>error</b>: readAsText succeeded when it should fail: " + evt.target.result
+ "<br />";
         };
@@ -173,6 +181,7 @@
                 fileEntry.getMetadata(onMetadataReceived, onError);
                 fileEntry.setMetadata(onMetadataSet, onMetadataSetError, { "com.apple.MobileBackup":
1 });
                 fileEntry.remove(onFileEntryRemoved, onFileEntryRemoveError);
+                fileEntry.getParent(onParentReceived, onGetParentError);
                 fileEntry.file(onFileReceived, onError);
             },
             onError,


Mime
View raw message