Merge b-i to m-c, a=merge

This commit is contained in:
Phil Ringnalda 2014-10-26 09:42:41 -07:00
commit eab7ec3c8b
18 changed files with 130 additions and 13 deletions

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="649d0ace7360a0740ef71fbffde91a52c8ea4c81"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e91d99e4d96954f06383c00bb9d79598a697e310"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="649d0ace7360a0740ef71fbffde91a52c8ea4c81"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e91d99e4d96954f06383c00bb9d79598a697e310"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="649d0ace7360a0740ef71fbffde91a52c8ea4c81"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e91d99e4d96954f06383c00bb9d79598a697e310"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="be8b952fde51d8c83748b41ce232f02b2218451d"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="649d0ace7360a0740ef71fbffde91a52c8ea4c81"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e91d99e4d96954f06383c00bb9d79598a697e310"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="649d0ace7360a0740ef71fbffde91a52c8ea4c81"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e91d99e4d96954f06383c00bb9d79598a697e310"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="649d0ace7360a0740ef71fbffde91a52c8ea4c81"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e91d99e4d96954f06383c00bb9d79598a697e310"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="649d0ace7360a0740ef71fbffde91a52c8ea4c81"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e91d99e4d96954f06383c00bb9d79598a697e310"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="be8b952fde51d8c83748b41ce232f02b2218451d"/>

View File

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "bdc73f56907e3a1e80441e0a287029edaa93df3c",
"revision": "3d86f253ab4a50bb899aa6642ff52ee525502664",
"repo_path": "/integration/gaia-central"
}

View File

@ -17,7 +17,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="649d0ace7360a0740ef71fbffde91a52c8ea4c81"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e91d99e4d96954f06383c00bb9d79598a697e310"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -15,7 +15,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="649d0ace7360a0740ef71fbffde91a52c8ea4c81"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e91d99e4d96954f06383c00bb9d79598a697e310"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="649d0ace7360a0740ef71fbffde91a52c8ea4c81"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e91d99e4d96954f06383c00bb9d79598a697e310"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="be8b952fde51d8c83748b41ce232f02b2218451d"/>

View File

@ -17,7 +17,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="649d0ace7360a0740ef71fbffde91a52c8ea4c81"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e91d99e4d96954f06383c00bb9d79598a697e310"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -471,7 +471,8 @@ this.AppsUtils = {
let netutil = Cc["@mozilla.org/network/util;1"].getService(Ci.nsINetUtil);
let contentType = netutil.parseContentType(aContentType, charset, hadCharset);
if (aInstallOrigin != aWebappOrigin &&
contentType != "application/x-web-app-manifest+json") {
!(contentType == "application/x-web-app-manifest+json" ||
contentType == "application/manifest+json")) {
return false;
}
return true;

View File

@ -0,0 +1,13 @@
{
"name": "My W3C Web App",
"short_name": "My App",
"icons": [
{
"src": "/favicon.ico",
"sizes": "64x64",
"type": "image/png"
}
],
"start_url": "/index.html",
"display": "standalone"
}

View File

@ -0,0 +1 @@
Content-Type: application/manifest+json

View File

@ -8,6 +8,8 @@ support-files =
file_cached_app.template.appcache
file_cached_app.template.webapp
file_hosted_app.template.webapp
file_manifest.json
file_manifest.json^headers^
file_trusted_app.template.webapp
file_invalidWidget_app.template.webapp
file_packaged_app.sjs
@ -38,4 +40,5 @@ skip-if = (toolkit == 'android' && processor == 'x86') #x86 only
[test_signed_pkg_install.html]
[test_uninstall_errors.html]
[test_theme_role.html]
[test_web_app_install.html]
[test_widget.html]

View File

@ -0,0 +1,98 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id={1075716}
-->
<head>
<title>Install web app from manifest with application/manifest+json MIME type</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id={1075716}">Mozilla Bug {1075716}</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
var gGenerator = runTest();
function go() {
SpecialPowers.pushPermissions(
[{ "type": "webapps-manage", "allow": 1, "context": document }],
function() { gGenerator.next() });
}
function continueTest() {
try {
gGenerator.next();
} catch (e if e instanceof StopIteration) {
finish();
}
}
function finish() {
SimpleTest.finish();
}
function cbError(aEvent) {
ok(false, "Error callback invoked " +
aEvent.target.error.name + " " + aEvent.target.error.message);
finish();
}
SimpleTest.waitForExplicitFinish();
/**
* Install a web app from a manifest with application/manifest+json MIME type.
*/
function runTest() {
SpecialPowers.setAllAppsLaunchable(true);
var manifestURL = "http://test/tests/dom/apps/tests/file_manifest.json";
SpecialPowers.autoConfirmAppInstall(continueTest);
yield undefined;
SpecialPowers.autoConfirmAppUninstall(continueTest);
yield undefined;
var request = navigator.mozApps.mgmt.getAll();
request.onerror = cbError;
request.onsuccess = continueTest;
yield undefined;
var initialAppsCount = request.result.length;
info("Starting with " + initialAppsCount + " apps installed.");
var request = navigator.mozApps.install(manifestURL, { });
request.onerror = cbError;
request.onsuccess = continueTest;
yield undefined;
var app = request.result;
ok(app, "App is non-null");
is(app.manifestURL, manifestURL, "App manifest url is correct.");
request = navigator.mozApps.mgmt.uninstall(app);
request.onerror = cbError;
request.onsuccess = continueTest;
yield undefined;
is(request.result, manifestURL, "App uninstalled.");
request = navigator.mozApps.mgmt.getAll();
request.onerror = cbError;
request.onsuccess = continueTest;
yield undefined;
is(request.result.length, initialAppsCount, "Correct number of apps.");
}
addLoadEvent(go);
</script>
</pre>
</body>
</html>

View File

@ -442,6 +442,7 @@ let NetworkHelper = {
"application/x-json": "json",
"application/json-rpc": "json",
"application/x-web-app-manifest+json": "json",
"application/manifest+json": "json"
},
/**