cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dase...@apache.org
Subject cordova-windows git commit: CB-10446 Windows 10 Cordova Application restart instead of resume
Date Fri, 29 Jan 2016 08:43:55 GMT
Repository: cordova-windows
Updated Branches:
  refs/heads/master 35f48b4ea -> e1056e185


CB-10446 Windows 10 Cordova Application restart instead of resume


Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/e1056e18
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/e1056e18
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/e1056e18

Branch: refs/heads/master
Commit: e1056e1852c33749f0d42d04c5dce0e966c39547
Parents: 35f48b4
Author: daserge <v-seshak@microsoft.com>
Authored: Wed Jan 27 22:48:13 2016 +0300
Committer: daserge <v-seshak@microsoft.com>
Committed: Thu Jan 28 19:55:57 2016 +0300

----------------------------------------------------------------------
 spec/unit/Prepare.Win10.spec.js | 6 +++++-
 template/cordova/lib/prepare.js | 4 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/e1056e18/spec/unit/Prepare.Win10.spec.js
----------------------------------------------------------------------
diff --git a/spec/unit/Prepare.Win10.spec.js b/spec/unit/Prepare.Win10.spec.js
index caa2e3b..b992332 100644
--- a/spec/unit/Prepare.Win10.spec.js
+++ b/spec/unit/Prepare.Win10.spec.js
@@ -121,7 +121,11 @@ describe('Windows 10 project', function() {
         applyStartPage(mockConfig.config, mockConfig.manifest, true);
 
         var app = mockConfig.manifest.doc.find('.//Application');
-        expect(app.attrib.StartPage).toBe('ms-appx-web:///www/index.html');
+
+        // Workaround to avoid WWAHost.exe bug: https://issues.apache.org/jira/browse/CB-10446
+        var isAppxWebStartupUri = app.attrib.StartPage === 'ms-appx-web:///www/index.html'
|| 
+            app.attrib.StartPage === 'ms-appx-web://' + mockConfig.config.packageName() +
'/www/index.html';
+        expect(isAppxWebStartupUri).toBe(true);
     });
 
     it ('should allow ms-appx as its startup URI, and it gets removed from the final output.',
function() {

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/e1056e18/template/cordova/lib/prepare.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/prepare.js b/template/cordova/lib/prepare.js
index 69403cf..1b421a0 100644
--- a/template/cordova/lib/prepare.js
+++ b/template/cordova/lib/prepare.js
@@ -216,7 +216,9 @@ function applyStartPage(config, manifest, targetingWin10) {
         startPagePrefix = '';
     }
     else if (uriPrefix.toLowerCase().substring(0, 7) === 'ms-appx') {
-        uriPrefix += '/'; // add a 3rd trailing forward slash for correct area resolution
+        var pkgName = config.getPreference('WindowsStoreIdentityName') || config.packageName();
+        // Workaround to avoid WWAHost.exe bug: https://issues.apache.org/jira/browse/CB-10446
+        uriPrefix += pkgName + '/'; // add Identity.Name
     }
 
     manifest.getApplication().setStartPage(uriPrefix + startPagePrefix + startPage);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message