Bug 1136580 - Fix test_TelemetryEnvironment.js failures on Android. r=gfritzsche

This commit is contained in:
Alessio Placitelli 2015-02-25 23:54:35 +01:00
parent c394678048
commit 7087f33bec

View File

@ -396,7 +396,7 @@ function checkSystemSection(data) {
Assert.ok(Number.isFinite(osData["servicePackMinor"]),
"ServicePackMinor must be a number.");
} else if (gIsAndroid || gIsGonk) {
Assert.ok(checkString(osData.kernelVersion));
Assert.ok(checkNullOrString(osData.kernelVersion));
}
let check = gIsWindows ? checkString : checkNullOrString;
@ -545,8 +545,12 @@ function checkAddonsSection(data) {
// Check active GMPlugins
let activeGMPlugins = data.addons.activeGMPlugins;
for (let gmPlugin in activeGMPlugins) {
checkActiveGMPlugin(activeGMPlugins[gmPlugin]);
if (!gIsAndroid) {
// We don't check for data validity on Android here since XPCSHELL tests on Android
// report one valid (plugin.isValid == true) GMPlugin with a "null" version field.
for (let gmPlugin in activeGMPlugins) {
checkActiveGMPlugin(activeGMPlugins[gmPlugin]);
}
}
// Check the active Experiment
@ -786,6 +790,11 @@ add_task(function* test_addonsWatch_InterestingChange() {
});
add_task(function* test_pluginsWatch_Add() {
if (gIsAndroid) {
Assert.ok(true, "Skipping: there is no Plugin Manager on Android.");
return;
}
yield TelemetryEnvironment.init();
let newPlugin = new PluginTag(PLUGIN2_NAME, PLUGIN2_DESC, PLUGIN2_VERSION, true);
@ -809,6 +818,11 @@ add_task(function* test_pluginsWatch_Add() {
});
add_task(function* test_pluginsWatch_Remove() {
if (gIsAndroid) {
Assert.ok(true, "Skipping: there is no Plugin Manager on Android.");
return;
}
yield TelemetryEnvironment.init();
// Find the test plugin.