@@ -3436,6 +3436,7 @@ exports.defineAutoTests = function () {
34363436 * which appears to be sane.
34373437 */
34383438 var pathExpect = cordova . platformId === 'windowsphone' ? '//nativ' : 'file://' ; // eslint-disable-line no-undef
3439+
34393440 if ( isChrome ) {
34403441 pathExpect = 'filesystem:http://' ;
34413442 }
@@ -3805,18 +3806,22 @@ exports.defineAutoTests = function () {
38053806 } ) ;
38063807 } ) ;
38073808
3808- describe ( 'resolveLocalFileSystemURL on cdvfile:// ' , function ( ) {
3809+ describe ( 'resolveLocalFileSystemURL for cdvfile' , function ( ) {
38093810 it ( 'file.spec.147 should be able to resolve cdvfile applicationDirectory fs root' , function ( done ) {
38103811 var cdvfileApplicationDirectoryFsRootName ;
3812+ var cdvfileApplicationDirectoryFsRootNameURL ;
38113813 if ( cordova . platformId === 'android' ) {
38123814 cdvfileApplicationDirectoryFsRootName = 'assets' ;
3815+ cdvfileApplicationDirectoryFsRootNameURL = 'https://localhost/__cdvfile_' + cdvfileApplicationDirectoryFsRootName + '__/'
38133816 } else if ( cordova . platformId === 'ios' ) {
38143817 cdvfileApplicationDirectoryFsRootName = 'bundle' ;
3818+ cdvfileApplicationDirectoryFsRootNameURL = 'cdvfile://localhost/' + cdvfileApplicationDirectoryFsRootName + '/'
38153819 } else {
38163820 pending ( ) ;
38173821 }
38183822
3819- resolveLocalFileSystemURL ( 'cdvfile://localhost/' + cdvfileApplicationDirectoryFsRootName + '/' , function ( applicationDirectoryRoot ) {
3823+ resolveLocalFileSystemURL ( cdvfileApplicationDirectoryFsRootNameURL , function ( applicationDirectoryRoot ) {
3824+ console . log ( applicationDirectoryRoot ) ;
38203825 expect ( applicationDirectoryRoot . isFile ) . toBe ( false ) ;
38213826 expect ( applicationDirectoryRoot . isDirectory ) . toBe ( true ) ;
38223827 expect ( applicationDirectoryRoot . name ) . toCanonicallyMatch ( '' ) ;
@@ -3825,7 +3830,7 @@ exports.defineAutoTests = function () {
38253830
38263831 // Requires HelloCordova www assets, <allow-navigation href="cdvfile:*" /> in config.xml or
38273832 // cdvfile: in CSP and <access origin="cdvfile://*" /> in config.xml
3828- resolveLocalFileSystemURL ( 'cdvfile://localhost/' + cdvfileApplicationDirectoryFsRootName + '/www/img/logo.png' , function ( entry ) {
3833+ resolveLocalFileSystemURL ( cdvfileApplicationDirectoryFsRootNameURL + '/www/img/logo.png' , function ( entry ) {
38293834 /* eslint-enable no-undef */
38303835 expect ( entry . isFile ) . toBe ( true ) ;
38313836 expect ( entry . isDirectory ) . toBe ( false ) ;
@@ -3841,7 +3846,7 @@ exports.defineAutoTests = function () {
38413846 img . onload = function ( ) {
38423847 done ( ) ;
38433848 } ;
3844- img . src = entry . toInternalURL ( ) ;
3849+ img . src = entry . toURL ( ) ;
38453850 } , failed . bind ( null , done , 'resolveLocalFileSystemURL failed for cdvfile applicationDirectory' ) ) ;
38463851 } , failed . bind ( null , done , 'resolveLocalFileSystemURL failed for cdvfile applicationDirectory' ) ) ;
38473852 } ) ;
0 commit comments