[ 
https://issues.apache.org/jira/browse/CB-13892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16436020#comment-16436020
 ] 

ASF GitHub Bot commented on CB-13892:
-------------------------------------

stevengill closed pull request #67: CB-13892:(all) Remove navigator.notification
URL: https://github.com/apache/cordova-plugin-vibration/pull/67
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/plugin.xml b/plugin.xml
index 3f5c705..9cae7e8 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -47,7 +47,6 @@
         <header-file src="src/ios/CDVVibration.h" />
            <source-file src="src/ios/CDVVibration.m" />
         <js-module src="www/vibration.js" name="notification">
-            <merges target="navigator.notification" />
             <merges target="navigator" />
         </js-module>
 
@@ -60,7 +59,6 @@
             <runs />
         </js-module>
         <js-module src="www/vibration.js" name="notification">
-            <merges target="navigator.notification" />
             <merges target="navigator" />
         </js-module>
 
@@ -71,11 +69,9 @@
     <!-- browser -->
     <platform name="browser">
         <js-module src="src/browser/Vibration.js" name="Vibration">
-            <merges target="navigator.notification" />
             <merges target="navigator" />
         </js-module>
         <js-module src="www/vibration.js" name="notification">
-            <merges target="navigator.notification" />
             <merges target="navigator" />
         </js-module>
     </platform>
diff --git a/tests/tests.js b/tests/tests.js
index 74ae349..675b002 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -41,34 +41,6 @@ exports.defineManualTests = function (contentEl, 
createActionButton) {
     // Vibrations
     // 
-------------------------------------------------------------------------
 
-    // old vibrate call
-    var vibrateOld = function () {
-        clearLog();
-        navigator.notification.vibrate(2500);
-        logMessage('navigator.notification.vibrate(2500)', 'green');
-    };
-
-    // old vibrate with pattern call
-    var vibrateWithPatternOld = function () {
-        clearLog();
-        navigator.notification.vibrateWithPattern([1000, 3000, 2000, 5000]);
-        logMessage('navigator.notification.vibrateWithPattern([1000, 3000, 
2000, 5000])', 'green');
-    };
-
-    // old vibrate with pattern with repeat call
-    var vibrateWithPatternOldWithRepeat = function () {
-        clearLog();
-        navigator.notification.vibrateWithPattern([1000, 3000, 2000, 5000], 2);
-        logMessage('navigator.notification.vibrateWithPattern([1000, 3000, 
2000, 5000], 2)', 'green');
-    };
-
-    // old cancel vibrate call
-    var cancelOld = function () {
-        clearLog();
-        navigator.notification.cancelVibration();
-        logMessage('navigator.notification.cancelVibration()', 'green');
-    };
-
     // new standard vibrate call that aligns to w3c spec with param long
     var vibrateWithInt = function () {
         clearLog();
@@ -145,16 +117,6 @@ exports.defineManualTests = function (contentEl, 
createActionButton) {
     var vibrate_tests = '<h1>Vibrate Tests</h1>' +
         '<h3>Starred tests only work for Android and Windows. </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: Pause for 1s, vibrate for 3s, pause for 2s, vibrate 
for 5s.' +
-        '<p/> <div id="vibrateWithPatternRepeat_old"></div>' +
-        'Expected result: Pause for 1s, vibrate for 3s, [pause for 2s, vibrate 
for 5s.], repeat [steps]' +
-        '<p/> <div id="cancelVibrate_old"></div>' +
-        'Expected result: Press once to initiate vibrate for 60 seconds. Press 
again to cancel vibrate immediately.' +
-        '<p/> <div id="cancelVibrateWithPattern_old"></div>' +
-        'Expected result: Press once to initiate vibrate with pattern for 45s. 
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>' +
@@ -174,45 +136,6 @@ exports.defineManualTests = function (contentEl, 
createActionButton) {
 
     contentEl.innerHTML = '<div id="info"></div>' + vibrate_tests;
 
-    // standard vibrate with old call
-    createActionButton('Vibrate (Old)', function () {
-        vibrateOld();
-    }, 'vibrate_old');
-
-    // vibrate with pattern with old call
-    createActionButton('* Vibrate with a pattern (Old)', function () {
-        vibrateWithPatternOld();
-    }, 'vibrateWithPattern_old');
-
-    // vibrate with pattern with repeat with old call
-    createActionButton('* Vibrate with a pattern with repeat (Old)', function 
() {
-        vibrateWithPatternOldWithRepeat();
-    }, 'vibrateWithPatternRepeat_old');
-
-    // cancel vibrate with old call
-    createActionButton('* Cancel vibration (Old)', function () {
-
-        if (!vibrateOn) {
-            longVibrate();
-        } else {
-            cancelOld();
-            resetVibrateOn();
-            clearTimeout(timeout); // clear the timeout since user has 
canceled the vibrate
-        }
-    }, 'cancelVibrate_old');
-
-    // cancel vibrate with pattern with old call
-    createActionButton('* Cancel vibration with pattern (Old)', function () {
-
-        if (!vibrateOn) {
-            longVibrateWithPattern();
-        } else {
-            cancelOld();
-            resetVibrateOn();
-            clearTimeout(timeout); // clear the timeout since user has 
canceled the vibrate
-        }
-    }, 'cancelVibrateWithPattern_old');
-
     // standard vibrate with new call param int
     createActionButton('Vibrate with int', function () {
         vibrateWithInt();


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Remove navigator.notification from vibration plugin
> ---------------------------------------------------
>
>                 Key: CB-13892
>                 URL: https://issues.apache.org/jira/browse/CB-13892
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-vibration
>            Reporter: jcesarmobile
>            Assignee: jcesarmobile
>            Priority: Major
>
> The navigator.notification was deprecated long time ago and also deleted from 
> the docs, but the plugin still have it as merges in the plugin.xml
> We should remove it from plugin.xml and from the manual tests.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to