CB-12364 [Windows] Inappbrowser inject file manual tests are not working

This commit is contained in:
daserge
2017-01-18 17:42:55 +03:00
parent 92ca973b3d
commit d842693889
2 changed files with 8 additions and 2 deletions
+4 -2
View File
@@ -313,7 +313,8 @@ var IAB = {
}
if (isWebViewAvailable && browserWrap && popup) {
var uri = new Windows.Foundation.Uri(filePath);
// CB-12364 getFileFromApplicationUriAsync does not support ms-appx-web
var uri = new Windows.Foundation.Uri(filePath.replace('ms-appx-web:', 'ms-appx:'));
Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri).done(function (file) {
Windows.Storage.FileIO.readTextAsync(file).done(function (code) {
var op = popup.invokeScriptAsync("eval", code);
@@ -350,7 +351,8 @@ var IAB = {
filePath = filePath && urlutil.makeAbsolute(filePath);
if (isWebViewAvailable && browserWrap && popup) {
var uri = new Windows.Foundation.Uri(filePath);
// CB-12364 getFileFromApplicationUriAsync does not support ms-appx-web
var uri = new Windows.Foundation.Uri(filePath.replace('ms-appx-web:', 'ms-appx:'));
Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri).then(function (file) {
return Windows.Storage.FileIO.readTextAsync(file);
}).done(function (code) {