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/08/07 22:48:34 UTC

[07/11] git commit: add setTimeout function to update vibrateOn var if user doesn't cancel vibrate, add note about iOS

add setTimeout function to update vibrateOn var if user doesn't cancel vibrate, add note about iOS


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/commit/5ce57fc0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/tree/5ce57fc0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/diff/5ce57fc0

Branch: refs/heads/master
Commit: 5ce57fc08d513e798052f4aeb992e2752980ba03
Parents: 90c6335
Author: Edna Morales <ed...@ednas-mbp-2.raleigh.ibm.com>
Authored: Mon Jul 21 08:57:14 2014 -0400
Committer: Edna Morales <ed...@ednas-mbp-2.raleigh.ibm.com>
Committed: Mon Jul 21 08:57:14 2014 -0400

----------------------------------------------------------------------
 test/tests.js | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/5ce57fc0/test/tests.js
----------------------------------------------------------------------
diff --git a/test/tests.js b/test/tests.js
index 86fa7b9..689f0f1 100644
--- a/test/tests.js
+++ b/test/tests.js
@@ -114,6 +114,9 @@ exports.defineManualTests = function (contentEl, createActionButton) {
         clearLog();
         navigator.vibrate(60000);
         logMessage("navigator.vibrate(60000)", "green");
+        setTimeout(function() {
+            vibrateOn = false;
+        }, 60000);
     };
 
     //check whether there is an ongoing vibration
@@ -124,12 +127,13 @@ exports.defineManualTests = function (contentEl, createActionButton) {
 
     var vibrate_tests = '<h1>Vibrate Tests</h1>' +
         '<h3>Starred tests only work for Android. </h3>' +
+        '<h3>iOS ignores the time given for a vibrate </h3>' +
         '<div id="vibrate_old"></div>' +
         'Expected result: Vibrate once for 2.5 seconds.' +
         '<p/> <div id="vibrateWithPattern_old"></div>' +
         'Expected result: Vibrate for 100ms, pause for 200ms, then vibrate for 300ms.' +
         '<p/> <div id="cancelVibrate_old"></div>' +
-        'Expected result: First press will begin vibration for 60 seconds. Pressing again will cancel immediately.' +
+        'Expected result: Press once to initiate vibrate for 60 seconds. Press again to cancel vibrate immediately.' +
         '<p/> <div id="vibrate_int"></div>' +
         'Expected result: Vibrate once for 3 seconds.' +
         '<p/> <div id="vibrate_array"></div>' +
@@ -137,9 +141,9 @@ exports.defineManualTests = function (contentEl, createActionButton) {
         '<p/> <div id="vibrate_with_pattern"></div>' +
         'Expected result: Vibrate for 100ms, pause for 200ms, then vibrate for 300ms.' +
         '<p/> <div id="cancel_zero"></div>' +
-        'Expected result: First press will begin vibration for 60 seconds. Pressing again will cancel immediately.' +
+        'Expected result: Press once to initiate vibrate for 60 seconds. Press again to cancel vibrate immediately.' +
         '<p/><div id="cancel_array"></div>' +
-        'Expected result: First press will begin vibration for 60 seconds. Pressing again will cancel immediately.';
+        'Expected result: Press once to initiate vibrate for 60 seconds. Press again to cancel vibrate immediately.';
 
 
     contentEl.innerHTML = '<div id="info"></div>' + vibrate_tests;