Bug 1349879 - Intl object is hidden on Android beta and release channel. r?snorp
Some interface tests into mochitest is failure on android beta and release.
test_serviceworker_interfaces.js has nonReleaseAndroid flag, so we should use it into test_interfaces.js and test_worker_interfaces.js
MozReview-Commit-ID: A1aHrTXwGil
--- a/dom/tests/mochitest/general/test_interfaces.js
+++ b/dom/tests/mochitest/general/test_interfaces.js
@@ -39,17 +39,17 @@ var ecmaGlobals =
// NB: We haven't bothered to resolve constants like Infinity and NaN on
// Xrayed windows (which are seen from the XBL scope). We could support
// this if needed with some refactoring.
{name: "Infinity", xbl: false},
"Int16Array",
"Int32Array",
"Int8Array",
"InternalError",
- "Intl",
+ {name: "Intl", nonReleaseAndroid: true, android: false},
"Iterator",
"JSON",
"Map",
"Math",
{name: "NaN", xbl: false},
"Number",
"Object",
"Promise",
@@ -1313,22 +1313,23 @@ function createInterfaceMap(isXBLScope)
{
for (var entry of interfaces) {
if (typeof(entry) === "string") {
interfaceMap[entry] = true;
} else {
ok(!("pref" in entry), "Bogus pref annotation for " + entry.name);
if ((entry.nightly === !isNightly) ||
(entry.nightlyAndroid === !(isAndroid && isNightly) && isAndroid) ||
+ (entry.nonReleaseAndroid === !(isAndroid && !isRelease) && isAndroid) ||
(entry.xbl === !isXBLScope) ||
(entry.desktop === !isDesktop) ||
(entry.windows === !isWindows) ||
(entry.mac === !isMac) ||
(entry.linux === !isLinux) ||
- (entry.android === !isAndroid && !entry.nightlyAndroid) ||
+ (entry.android === !isAndroid && !entry.nonReleaseAndroid && !entry.nightlyAndroid) ||
(entry.release === !isRelease) ||
(entry.isSecureContext === !isSecureContext) ||
entry.disabled) {
interfaceMap[entry.name] = false;
} else {
interfaceMap[entry.name] = true;
}
}
--- a/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js
+++ b/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js
@@ -34,17 +34,17 @@ var ecmaGlobals =
"Float32Array",
"Float64Array",
"Function",
"Infinity",
"Int16Array",
"Int32Array",
"Int8Array",
"InternalError",
- "Intl",
+ {name: "Intl", nonReleaseAndroid: true, android: false},
"Iterator",
"JSON",
"Map",
"Math",
"NaN",
"Number",
"Object",
"Promise",
--- a/dom/workers/test/test_worker_interfaces.js
+++ b/dom/workers/test/test_worker_interfaces.js
@@ -34,17 +34,17 @@ var ecmaGlobals =
"Float32Array",
"Float64Array",
"Function",
"Infinity",
"Int16Array",
"Int32Array",
"Int8Array",
"InternalError",
- "Intl",
+ {name: "Intl", nonReleaseAndroid: true, android: false},
"Iterator",
"JSON",
"Map",
"Math",
"NaN",
"Number",
"Object",
"Promise",
@@ -257,18 +257,19 @@ function createInterfaceMap(version, use
{
for (var entry of interfaces) {
if (typeof(entry) === "string") {
interfaceMap[entry] = true;
} else {
ok(!("pref" in entry), "Bogus pref annotation for " + entry.name);
if ((entry.nightly === !isNightly) ||
(entry.nightlyAndroid === !(isAndroid && isNightly) && isAndroid) ||
+ (entry.nonReleaseAndroid === !(isAndroid && !isRelease) && isAndroid) ||
(entry.desktop === !isDesktop) ||
- (entry.android === !isAndroid && !entry.nightlyAndroid) ||
+ (entry.android === !isAndroid && !entry.nonReleaseAndroid && !entry.nightlyAndroid) ||
(entry.release === !isRelease) ||
(entry.isSecureContext === !isSecureContext) ||
entry.disabled) {
interfaceMap[entry.name] = false;
} else if (entry.optional) {
interfaceMap[entry.name] = "optional";
} else {
interfaceMap[entry.name] = true;