Merge latest green inbound changeset and mozilla-central; a=merge

This commit is contained in:
Ed Morley 2014-06-10 15:58:31 +01:00
commit d68ffc0efe
18 changed files with 109 additions and 25 deletions

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="f42ebc93554979501d3ac52bcf9e69cb4b310a4f"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e0c637f14265291ed81934058ec1cc019612127c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="dbb66e540194a187326cece28ae0b51cdd500184"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8e4420c0c5c8e8c8e58a000278a7129403769f96"/>

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="f42ebc93554979501d3ac52bcf9e69cb4b310a4f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e0c637f14265291ed81934058ec1cc019612127c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="dbb66e540194a187326cece28ae0b51cdd500184"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="cabebb87fcd32f8596af08e6b5e80764ee0157dd"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="276ce45e78b09c4a4ee643646f691d22804754c1">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="f42ebc93554979501d3ac52bcf9e69cb4b310a4f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e0c637f14265291ed81934058ec1cc019612127c"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="dbb66e540194a187326cece28ae0b51cdd500184"/>
<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="f42ebc93554979501d3ac52bcf9e69cb4b310a4f"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e0c637f14265291ed81934058ec1cc019612127c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="dbb66e540194a187326cece28ae0b51cdd500184"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8e4420c0c5c8e8c8e58a000278a7129403769f96"/>

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="f42ebc93554979501d3ac52bcf9e69cb4b310a4f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e0c637f14265291ed81934058ec1cc019612127c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="dbb66e540194a187326cece28ae0b51cdd500184"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="cabebb87fcd32f8596af08e6b5e80764ee0157dd"/>
@ -118,7 +118,7 @@
<!-- Flame specific things -->
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="e8a318f7690092e639ba88891606f4183e846d3f"/>
<project name="device/qcom/common" path="device/qcom/common" revision="34ed8345250bb97262d70a052217a92e83444ede"/>
<project name="device-flame" path="device/t2m/flame" remote="b2g" revision="9971053a02fb1b2c574dbf9ddd9405f6b8ddc53a"/>
<project name="device-flame" path="device/t2m/flame" remote="b2g" revision="70c66225521828ad568c0c72859c6f17c3182f1b"/>
<project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="6d29b672b039612c08c40e92d8051a4cfbd38162"/>
<project name="kernel_lk" path="bootable/bootloader/lk" remote="b2g" revision="2b1d8b5b7a760230f4c94c02e733e3929f44253a"/>
<project name="platform/bootable/recovery" path="bootable/recovery" revision="f2914eacee9120680a41463708bb6ee8291749fc"/>

View File

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "89087e33f8ad411f955b7918f33bb54a100a1413",
"revision": "37cd9a62b2cb570985d99a5519b136672614b980",
"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="f42ebc93554979501d3ac52bcf9e69cb4b310a4f"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e0c637f14265291ed81934058ec1cc019612127c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="dbb66e540194a187326cece28ae0b51cdd500184"/>
<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="f42ebc93554979501d3ac52bcf9e69cb4b310a4f"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e0c637f14265291ed81934058ec1cc019612127c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="dbb66e540194a187326cece28ae0b51cdd500184"/>
<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="f42ebc93554979501d3ac52bcf9e69cb4b310a4f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e0c637f14265291ed81934058ec1cc019612127c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="dbb66e540194a187326cece28ae0b51cdd500184"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="cabebb87fcd32f8596af08e6b5e80764ee0157dd"/>

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="f42ebc93554979501d3ac52bcf9e69cb4b310a4f"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e0c637f14265291ed81934058ec1cc019612127c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="dbb66e540194a187326cece28ae0b51cdd500184"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -171,7 +171,21 @@ function next() {
SimpleTest.waitForExplicitFinish();
SpecialPowers.addPermission("networkstats-manage", true, document);
SpecialPowers.pushPrefEnv({'set': [["dom.mozNetworkStats.enabled", true]]}, test);
SpecialPowers.pushPrefEnv({'set': [["dom.mozNetworkStats.enabled", true]]},
function() {
ok(SpecialPowers.hasPermission("networkstats-manage", document),
"Has permission 'networkstats-manage'.");
ok(SpecialPowers.getBoolPref("dom.mozNetworkStats.enabled"),
"Preference 'dom.mozNetworkStats.enabled' is true.");
ok('mozNetworkStats' in navigator, "navigator.mozNetworkStats should exist");
ok(navigator.mozNetworkStats instanceof SpecialPowers.Ci.nsIDOMMozNetworkStatsManager,
"navigator.mozNetworkStats should be a nsIDOMMozNetworkStatsManager object");
test();
});
</script>
</pre>

View File

@ -323,7 +323,21 @@ function next() {
SimpleTest.waitForExplicitFinish();
SpecialPowers.addPermission("networkstats-manage", true, document);
SpecialPowers.pushPrefEnv({'set': [["dom.mozNetworkStats.enabled", true]]}, test);
SpecialPowers.pushPrefEnv({'set': [["dom.mozNetworkStats.enabled", true]]},
function() {
ok(SpecialPowers.hasPermission("networkstats-manage", document),
"Has permission 'networkstats-manage'.");
ok(SpecialPowers.getBoolPref("dom.mozNetworkStats.enabled"),
"Preference 'dom.mozNetworkStats.enabled' is true.");
ok('mozNetworkStats' in navigator, "navigator.mozNetworkStats should exist");
ok(navigator.mozNetworkStats instanceof SpecialPowers.Ci.nsIDOMMozNetworkStatsManager,
"navigator.mozNetworkStats should be a nsIDOMMozNetworkStatsManager object");
test();
});
</script>
</pre>

View File

@ -17,10 +17,15 @@
SimpleTest.waitForExplicitFinish();
// Test to ensure NetworkStats is not accessible when it is disabled
SpecialPowers.pushPrefEnv({'set': [["dom.mozNetworkStats.enabled", false]]}, function(){
SpecialPowers.pushPrefEnv({'set': [["dom.mozNetworkStats.enabled", false]]},
function() {
ok(!SpecialPowers.getBoolPref("dom.mozNetworkStats.enabled"),
"Preference 'dom.mozNetworkStats.enabled' is false.");
ok('mozNetworkStats' in navigator, "navigator.mozNetworkStats should exist");
is(navigator.mozNetworkStats, null, "mozNetworkStats should be null when not enabled.");
is(navigator.mozNetworkStats, null,
"mozNetworkStats should be null when not enabled.");
SimpleTest.finish();
});

View File

@ -13,21 +13,34 @@
<script type="application/javascript">
// Test to ensure NetworkStats is enabled but mozNetworkStats.getAvailableNetworks
// does not work in content.
// does not work in content because mozNetworkStats is null when no permission.
SpecialPowers.setBoolPref("dom.mozNetworkStats.enabled", true);
SpecialPowers.removePermission("networkstats-manage", document);
ok('mozNetworkStats' in navigator, "navigator.mozNetworkStats should be accessible if dom.mozNetworkStats.enabled is true");
ok(SpecialPowers.getBoolPref("dom.mozNetworkStats.enabled"),
"Preference 'dom.mozNetworkStats.enabled' is true.");
ok(!SpecialPowers.hasPermission("networkstats-manage", document),
"Has no permission 'networkstats-manage'.");
ok('mozNetworkStats' in navigator, "navigator.mozNetworkStats should exist");
is(navigator.mozNetworkStats, null,
"mozNetworkStats should be null when no permission.");
var error;
try {
navigator.mozNetworkStats.getAvailableNetworks;
ok(false, "Accessing navigator.mozNetworkStats.getAvailableNetworks should have thrown!");
ok(false,
"Accessing navigator.mozNetworkStats.getAvailableNetworks should throw!");
} catch (ex) {
error = ex;
}
ok(error, "Got an exception accessing navigator.mozNetworkStats.getAvailableNetworks");
ok(error,
"Got an exception accessing navigator.mozNetworkStats.getAvailableNetworks");
</script>
</pre>

View File

@ -18,11 +18,18 @@ SimpleTest.waitForExplicitFinish();
// Test to ensure NetworkStats is not accessible when it is disabled
SpecialPowers.addPermission("networkstats-manage", true, document);
SpecialPowers.pushPrefEnv({'set': [["dom.mozNetworkStats.enabled", true]]}, function(){
SpecialPowers.pushPrefEnv({'set': [["dom.mozNetworkStats.enabled", true]]},
function(){
ok(SpecialPowers.hasPermission("networkstats-manage", document),
"Has permission 'networkstats-manage'.");
ok(SpecialPowers.getBoolPref("dom.mozNetworkStats.enabled"),
"Preference 'dom.mozNetworkStats.enabled' is true.");
ok('mozNetworkStats' in navigator, "navigator.mozNetworkStats should exist");
ok(navigator.mozNetworkStats instanceof SpecialPowers.Ci.nsIDOMMozNetworkStatsManager,
"navigator.mozNetworkStats should be a nsIDOMMozNetworkStatsManager object");
"navigator.mozNetworkStats should be a nsIDOMMozNetworkStatsManager object");
SpecialPowers.removePermission("networkstats-manage", document);
SimpleTest.finish();

View File

@ -59,6 +59,17 @@ function toggleNFC(enabled) {
return deferred.promise;
}
function clearPendingMessages(type) {
if (!window.navigator.mozHasPendingMessage(type)) {
return;
}
// setting a handler removes all messages from queue
window.navigator.mozSetMessageHandler(type, function() {
window.navigator.mozSetMessageHandler(type, null);
});
}
function enableRE0() {
let deferred = Promise.defer();
let cmd = 'nfc nci rf_intf_activated_ntf 0';
@ -83,6 +94,9 @@ function cleanUp() {
}
function runNextTest() {
clearPendingMessages('nfc-manager-tech-discovered');
clearPendingMessages('nfc-manager-tech-lost');
let test = tests.shift();
if (!test) {
cleanUp();

View File

@ -1556,10 +1556,16 @@ bool NetworkUtils::setWifiTethering(NetworkParams& aOptions)
getIFProperties(GET_CHAR(mExternalIfname), interfaceProperties);
if (strcmp(interfaceProperties.dns1, "")) {
aOptions.mDns1 = NS_ConvertUTF8toUTF16(interfaceProperties.dns1);
int type = getIpType(interfaceProperties.dns1);
if (type != AF_INET6) {
aOptions.mDns1 = NS_ConvertUTF8toUTF16(interfaceProperties.dns1);
}
}
if (strcmp(interfaceProperties.dns2, "")) {
aOptions.mDns2 = NS_ConvertUTF8toUTF16(interfaceProperties.dns2);
int type = getIpType(interfaceProperties.dns2);
if (type != AF_INET6) {
aOptions.mDns2 = NS_ConvertUTF8toUTF16(interfaceProperties.dns2);
}
}
dumpParams(aOptions, "WIFI");
@ -1582,10 +1588,16 @@ bool NetworkUtils::setUSBTethering(NetworkParams& aOptions)
getIFProperties(GET_CHAR(mExternalIfname), interfaceProperties);
if (strcmp(interfaceProperties.dns1, "")) {
aOptions.mDns1 = NS_ConvertUTF8toUTF16(interfaceProperties.dns1);
int type = getIpType(interfaceProperties.dns1);
if (type != AF_INET6) {
aOptions.mDns1 = NS_ConvertUTF8toUTF16(interfaceProperties.dns1);
}
}
if (strcmp(interfaceProperties.dns2, "")) {
aOptions.mDns2 = NS_ConvertUTF8toUTF16(interfaceProperties.dns2);
int type = getIpType(interfaceProperties.dns2);
if (type != AF_INET6) {
aOptions.mDns2 = NS_ConvertUTF8toUTF16(interfaceProperties.dns2);
}
}
dumpParams(aOptions, "USB");

View File

@ -2778,6 +2778,11 @@ WifiWorker.prototype = {
var timer = null;
var self = this;
if (!WifiManager.enabled) {
callback.onfailure();
return;
}
self.waitForScan(waitForScanCallback);
doScan();
function doScan() {