cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [3/4] git commit: CB-7429 Fixes image capture manual tests on windows
Date Thu, 18 Sep 2014 23:31:39 GMT
CB-7429 Fixes image capture manual tests on windows


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/8f05569d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/8f05569d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/8f05569d

Branch: refs/heads/master
Commit: 8f05569dfed1bafa380b93567830f7cfc36678ed
Parents: 5dce4c1
Author: Vladimir Kotikov <v-vlkoti@microsoft.com>
Authored: Fri Sep 12 14:47:09 2014 +0400
Committer: Vladimir Kotikov <v-vlkoti@microsoft.com>
Committed: Fri Sep 12 14:47:09 2014 +0400

----------------------------------------------------------------------
 tests/tests.js | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/8f05569d/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index a8b4810..c98f64d 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -145,6 +145,10 @@ exports.defineManualTests = function (contentEl, createActionButton)
{
 
     function captureImageWin(mediaFiles) {
         var path = mediaFiles[0].fullPath;
+        // Necessary since windows doesn't allow file URLs for <img> elements
+        if (cordova.platformId == 'windows' || cordova.platformId == 'windows8') {
+            path = mediaFiles[0].localURL;
+        }
         log('Image captured: ' + path);
         document.getElementById('camera_image').src = path;
     }


Mime
View raw message