CB-12364 [Windows] Inappbrowser inject file manual tests are not working
This commit is contained in:
parent
92ca973b3d
commit
d842693889
@ -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) {
|
||||
|
@ -26,6 +26,10 @@ var cordova = require('cordova');
|
||||
var isWindows = cordova.platformId == 'windows';
|
||||
|
||||
window.alert = window.alert || navigator.notification.alert;
|
||||
if (isWindows && navigator && navigator.notification && navigator.notification.alert) {
|
||||
// window.alert is defined but not functional on UWP
|
||||
window.alert = navigator.notification.alert;
|
||||
}
|
||||
|
||||
exports.defineAutoTests = function () {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user