Skip to content

Commit

Permalink
test: remove deprecated cordova-plugin-contact tests (apache#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
erisu authored and pmcquay committed Sep 2, 2022
1 parent 0fd3b67 commit 79cf9ea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
1 change: 0 additions & 1 deletion tests/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@
android:exported="false" />
</config-file>
<asset src="www/fixtures/asset-test" target="fixtures/asset-test" />
<dependency id="cordova-plugin-contacts" />
</platform>
</plugin>
45 changes: 0 additions & 45 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down Expand Up @@ -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');
};

0 comments on commit 79cf9ea

Please sign in to comment.