From 0977d35aad93d78ab75e181ae515bb814df45295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Fri, 17 Sep 2021 00:39:59 +0900 Subject: [PATCH] test: remove deprecated cordova-plugin-contact tests (#493) --- tests/plugin.xml | 1 - tests/tests.js | 45 --------------------------------------------- 2 files changed, 46 deletions(-) diff --git a/tests/plugin.xml b/tests/plugin.xml index f19bf2e18..92425a3a1 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -38,6 +38,5 @@ android:exported="false" /> - diff --git a/tests/tests.js b/tests/tests.js index 7609738d8..af296ba7a 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -4171,37 +4171,6 @@ exports.defineManualTests = function (contentEl, createActionButton) { }, logError('requestFileSystem')); } - function resolveFsContactImage () { - navigator.contacts.pickContact(function (contact) { - var logBox = document.getElementById('logContactBox'); - logBox.innerHTML = ''; - var resolveResult = document.createElement('p'); - if (contact.photos) { - var photoURL = contact.photos[0].value; - resolveLocalFileSystemURL(photoURL, function (entry) { - /* eslint-enable no-undef */ - var contactImage = document.createElement('img'); - var contactLabelImage = document.createElement('p'); - contactLabelImage.innerHTML = 'Result contact image'; - contactImage.setAttribute('src', entry.toURL()); - resolveResult.innerHTML = 'Success resolve\n' + entry.toURL(); - logBox.appendChild(contactLabelImage); - logBox.appendChild(contactImage); - logBox.appendChild(resolveResult); - }, - function (err) { - console.log('resolve error' + err); - }); - } else { - resolveResult.innerHTML = 'Contact has no photos'; - logBox.appendChild(resolveResult); - } - }, - function (err) { - console.log('contact pick error' + err); - }); - } - function clearLog () { var log = document.getElementById('info'); log.innerHTML = ''; @@ -4285,18 +4254,4 @@ exports.defineManualTests = function (contentEl, createActionButton) { div.appendChild(document.createTextNode('Resolving content urls')); div.setAttribute('align', 'center'); contentEl.appendChild(div); - - div = document.createElement('div'); - div.setAttribute('id', 'contactButton'); - div.setAttribute('align', 'center'); - contentEl.appendChild(div); - - div = document.createElement('div'); - div.setAttribute('id', 'logContactBox'); - div.setAttribute('align', 'center'); - contentEl.appendChild(div); - - createActionButton('show-contact-image', function () { - resolveFsContactImage(); - }, 'contactButton'); };