Skip to content

Commit

Permalink
fix(android|ios): cdvfile applicationDirectory testing
Browse files Browse the repository at this point in the history
  • Loading branch information
erisu committed Jul 19, 2024
1 parent 6b8c981 commit b53318e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions tests/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
<js-module src="tests.js" name="tests">
</js-module>

<platform name="ios">
<config-file target="config.xml" parent="/*">
<allow-navigation href="cdvfile:*" />
<access origin="cdvfile://*" />
</config-file>
</platform>

<platform name="android">
<source-file src="src/android/TestContentProvider.java" target-dir="src/org/apache/cordova/file/test" />
<config-file target="AndroidManifest.xml" parent="/*/application">
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3815,7 +3815,7 @@ exports.defineAutoTests = function () {
let cdvfileApplicationDirectoryFsRootNameURL;
if (cordova.platformId === 'android') {
cdvfileApplicationDirectoryFsRootName = 'assets';
cdvfileApplicationDirectoryFsRootNameURL = 'https://localhost/__cdvfile_' + cdvfileApplicationDirectoryFsRootName + '__/';
cdvfileApplicationDirectoryFsRootNameURL = 'http://localhost/__cdvfile_' + cdvfileApplicationDirectoryFsRootName + '__/';
} else if (cordova.platformId === 'ios') {
cdvfileApplicationDirectoryFsRootName = 'bundle';
cdvfileApplicationDirectoryFsRootNameURL = 'cdvfile://localhost/' + cdvfileApplicationDirectoryFsRootName + '/';
Expand Down

0 comments on commit b53318e

Please sign in to comment.