Bug 919384 - "Text reflow" robocop test checks for the wrong RELEASE_BUILD boolean value. r=gbrown

This commit is contained in:
Chenxia Liu 2013-09-24 15:02:41 -07:00
Родитель 5170d374d5
Коммит f6e5a681fe
1 изменённых файлов: 10 добавлений и 12 удалений

Просмотреть файл

@ -143,12 +143,18 @@ public class testSettingsMenuItems extends PixelTest {
ClassLoader classLoader = getActivity().getClassLoader();
Class appConstants = classLoader.loadClass("org.mozilla.gecko.AppConstants");
// Text reflow
Field textReflowField = appConstants.getField("RELEASE_BUILD");
boolean textReflow = textReflowField.getBoolean(appConstants);
if (textReflow) {
// Preferences dependent on RELEASE_BUILD
Field releaseBuildField = appConstants.getField("RELEASE_BUILD");
boolean releaseBuild = releaseBuildField.getBoolean(appConstants);
if (!releaseBuild) {
// Text reflow - only built if *not* release build
String[] textReflowUi = { "Text reflow" };
settingsMap.get("Display").add(textReflowUi);
// Anonymous cell tower/wifi collection - only built if *not* release build
String[] networkReportingUi = { "Mozilla location services", "Help improve geolocation services for the Open Web by letting " + BRAND_NAME + " collect and send anonymous cellular tower data" };
settingsMap.get("Mozilla").add(networkReportingUi);
}
// Automatic updates
@ -167,14 +173,6 @@ public class testSettingsMenuItems extends PixelTest {
settingsMap.get("Mozilla").add(crashReporterUi);
}
// Anonymous cell tower/wifi collection; built if *not* a RELEASE_BUILD
Field releaseBuildField = appConstants.getField("RELEASE_BUILD");
boolean releaseBuild = releaseBuildField.getBoolean(appConstants);
if (!releaseBuild) {
String[] networkReportingUi = { "Mozilla location services", "Help improve geolocation services for the Open Web by letting " + BRAND_NAME + " collect and send anonymous cellular tower data" };
settingsMap.get("Mozilla").add(networkReportingUi);
}
// Telemetry
Field telemetryField = appConstants.getField("MOZ_TELEMETRY_REPORTING");
boolean telemetry = telemetryField.getBoolean(appConstants);