@@ -4171,37 +4171,6 @@ exports.defineManualTests = function (contentEl, createActionButton) {
41714171 } , logError ( 'requestFileSystem' ) ) ;
41724172 }
41734173
4174- function resolveFsContactImage ( ) {
4175- navigator . contacts . pickContact ( function ( contact ) {
4176- var logBox = document . getElementById ( 'logContactBox' ) ;
4177- logBox . innerHTML = '' ;
4178- var resolveResult = document . createElement ( 'p' ) ;
4179- if ( contact . photos ) {
4180- var photoURL = contact . photos [ 0 ] . value ;
4181- resolveLocalFileSystemURL ( photoURL , function ( entry ) {
4182- /* eslint-enable no-undef */
4183- var contactImage = document . createElement ( 'img' ) ;
4184- var contactLabelImage = document . createElement ( 'p' ) ;
4185- contactLabelImage . innerHTML = 'Result contact image' ;
4186- contactImage . setAttribute ( 'src' , entry . toURL ( ) ) ;
4187- resolveResult . innerHTML = 'Success resolve\n' + entry . toURL ( ) ;
4188- logBox . appendChild ( contactLabelImage ) ;
4189- logBox . appendChild ( contactImage ) ;
4190- logBox . appendChild ( resolveResult ) ;
4191- } ,
4192- function ( err ) {
4193- console . log ( 'resolve error' + err ) ;
4194- } ) ;
4195- } else {
4196- resolveResult . innerHTML = 'Contact has no photos' ;
4197- logBox . appendChild ( resolveResult ) ;
4198- }
4199- } ,
4200- function ( err ) {
4201- console . log ( 'contact pick error' + err ) ;
4202- } ) ;
4203- }
4204-
42054174 function clearLog ( ) {
42064175 var log = document . getElementById ( 'info' ) ;
42074176 log . innerHTML = '' ;
@@ -4285,18 +4254,4 @@ exports.defineManualTests = function (contentEl, createActionButton) {
42854254 div . appendChild ( document . createTextNode ( 'Resolving content urls' ) ) ;
42864255 div . setAttribute ( 'align' , 'center' ) ;
42874256 contentEl . appendChild ( div ) ;
4288-
4289- div = document . createElement ( 'div' ) ;
4290- div . setAttribute ( 'id' , 'contactButton' ) ;
4291- div . setAttribute ( 'align' , 'center' ) ;
4292- contentEl . appendChild ( div ) ;
4293-
4294- div = document . createElement ( 'div' ) ;
4295- div . setAttribute ( 'id' , 'logContactBox' ) ;
4296- div . setAttribute ( 'align' , 'center' ) ;
4297- contentEl . appendChild ( div ) ;
4298-
4299- createActionButton ( 'show-contact-image' , function ( ) {
4300- resolveFsContactImage ( ) ;
4301- } , 'contactButton' ) ;
43024257} ;
0 commit comments