cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alsoro...@apache.org
Subject [1/2] cordova-plugin-camera git commit: CB-11709 Tests should use resolveLocalFileSystemURL() instead of deprecated resolveFileSystemURI()
Date Wed, 17 Aug 2016 14:35:53 GMT
Repository: cordova-plugin-camera
Updated Branches:
  refs/heads/master 92d67d990 -> 9f159d757


CB-11709 Tests should use resolveLocalFileSystemURL() instead of deprecated resolveFileSystemURI()


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/62d1b01e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/62d1b01e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/62d1b01e

Branch: refs/heads/master
Commit: 62d1b01e811753db006a3c75e599a5496b6205fc
Parents: 92d67d9
Author: Alexander Sorokin <alexander.sorokin@akvelon.com>
Authored: Tue Aug 16 19:19:22 2016 +0300
Committer: Alexander Sorokin <alexander.sorokin@akvelon.com>
Committed: Tue Aug 16 19:19:22 2016 +0300

----------------------------------------------------------------------
 appium-tests/helpers/cameraHelper.js |  6 +++---
 tests/tests.js                       | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/62d1b01e/appium-tests/helpers/cameraHelper.js
----------------------------------------------------------------------
diff --git a/appium-tests/helpers/cameraHelper.js b/appium-tests/helpers/cameraHelper.js
index cb22ec5..a16916f 100644
--- a/appium-tests/helpers/cameraHelper.js
+++ b/appium-tests/helpers/cameraHelper.js
@@ -1,5 +1,5 @@
 /*jshint node: true */
-/* global Q, resolveLocalFileSystemURI, Camera, cordova */
+/* global Q, resolveLocalFileSystemURL, Camera, cordova */
 /*
  *
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -174,11 +174,11 @@ module.exports.checkPicture = function (pid, options, cb) {
                 result.indexOf('content:') === 0 ||
                 result.indexOf('assets-library:') === 0) {
 
-                if (!window.resolveLocalFileSystemURI) {
+                if (!window.resolveLocalFileSystemURL) {
                     errorCallback('Cannot read file. Please install cordova-plugin-file to
fix this.');
                     return;
                 }
-                resolveLocalFileSystemURI(result, function (entry) {
+                resolveLocalFileSystemURL(result, function (entry) {
                     if (skipFileTypeCheck) {
                         displayFile(entry);
                     } else {

http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/62d1b01e/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 1513f14..222a839 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -19,7 +19,7 @@
  *
 */
 
-/* globals Camera, resolveLocalFileSystemURI, FileEntry, CameraPopoverOptions, FileTransfer,
FileUploadOptions, LocalFileSystem, MSApp */
+/* globals Camera, resolveLocalFileSystemURL, FileEntry, CameraPopoverOptions, FileTransfer,
FileUploadOptions, LocalFileSystem, MSApp */
 /* jshint jasmine: true */
 
 exports.defineAutoTests = function () {
@@ -142,11 +142,11 @@ exports.defineManualTests = function (contentEl, createActionButton)
{
         setPicture(data);
         // TODO: Fix resolveLocalFileSystemURI to work with native-uri.
         if (pictureUrl.indexOf('file:') === 0 || pictureUrl.indexOf('content:') === 0 ||
pictureUrl.indexOf('ms-appdata:') === 0 || pictureUrl.indexOf('assets-library:') === 0) {
-            resolveLocalFileSystemURI(data, function (e) {
+            resolveLocalFileSystemURL(data, function (e) {
                 fileEntry = e;
-                logCallback('resolveLocalFileSystemURI()', true)(e.toURL());
+                logCallback('resolveLocalFileSystemURL()', true)(e.toURL());
                 readFile();
-            }, logCallback('resolveLocalFileSystemURI()', false));
+            }, logCallback('resolveLocalFileSystemURL()', false));
         } else if (pictureUrl.indexOf('data:image/jpeg;base64') === 0) {
             // do nothing
         } else {
@@ -251,7 +251,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
 
             //cleanup
             //rename moved file back to original name so other tests can reference image
-            resolveLocalFileSystemURI(destDirEntry.nativeURL+'moved_file.png', function(fileEntry)
{
+            resolveLocalFileSystemURL(destDirEntry.nativeURL+'moved_file.png', function(fileEntry)
{
                 fileEntry.moveTo(destDirEntry, origName, logCallback('FileEntry.moveTo',
true), logCallback('FileEntry.moveTo', false));
                 console.log('Cleanup: successfully renamed file back to original name');
             }, function () {
@@ -259,7 +259,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
             });
 
             //remove copied file
-            resolveLocalFileSystemURI(destDirEntry.nativeURL+'copied_file.png', function(fileEntry)
{
+            resolveLocalFileSystemURL(destDirEntry.nativeURL+'copied_file.png', function(fileEntry)
{
                 fileEntry.remove(logCallback('FileEntry.remove', true), logCallback('FileEntry.remove',
false));
                 console.log('Cleanup: successfully removed copied file');
             }, function () {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message