You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2014/09/03 03:43:47 UTC

git commit: CB-7433 Fixes manual tests failure on windows

Repository: cordova-plugin-camera
Updated Branches:
  refs/heads/master e316e3280 -> c8c3bf078


CB-7433 Fixes manual tests failure on windows


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/c8c3bf07
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/c8c3bf07
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/c8c3bf07

Branch: refs/heads/master
Commit: c8c3bf0782e5dd4403c501362efdfad2c9e3e9fe
Parents: e316e32
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Sat Aug 30 01:20:41 2014 +0400
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Sat Aug 30 01:20:57 2014 +0400

----------------------------------------------------------------------
 tests/tests.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/c8c3bf07/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 48d5ff5..efe424b 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -429,7 +429,16 @@ exports.defineManualTests = function (contentEl, createActionButton) {
             '</p><div id="remove"></div>' +
             'Expected result: Remove image from library.<br>Status box will show "FileEntry.remove success:["OK"]';
 
-    contentEl.innerHTML = info_div + options_div + getpicture_div + test_procedure + inputs_div + actions_div;
+    // We need to wrap this code due to Windows security restrictions
+    // see http://msdn.microsoft.com/en-us/library/windows/apps/hh465380.aspx#differences for details
+    if (MSApp && MSApp.execUnsafeLocalFunction) {
+        MSApp.execUnsafeLocalFunction(function() {
+            contentEl.innerHTML = info_div + options_div + getpicture_div + test_procedure + inputs_div + actions_div;
+        });
+    } else {
+        contentEl.innerHTML = info_div + options_div + getpicture_div + test_procedure + inputs_div + actions_div;
+    }
+
     var elements = document.getElementsByClassName("testInputTag");
     var listener = function (e) {
         testInputTag(e.target);