Bug 900692 - Part 2: Add tests for developer tools settings. r=mcomella
authorChenxia Liu <liuche@mozilla.com>
Sat, 19 Jul 2014 19:57:31 -0700
changeset 216999 8c9fbda3a4e9996cb26b0f96aaa0d2be0f4f7ff5
parent 216998 96ae5120fa66725aa15f1dd6dd9db09b408ff4cf
child 217000 899a7a8eb6e6f52b18b926a40f8f32b6346f7e73
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs900692
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 900692 - Part 2: Add tests for developer tools settings. r=mcomella
mobile/android/base/tests/StringHelper.java
mobile/android/base/tests/testSettingsMenuItems.java
--- a/mobile/android/base/tests/StringHelper.java
+++ b/mobile/android/base/tests/StringHelper.java
@@ -131,16 +131,17 @@ public class StringHelper {
     public static final String FAQS_LABEL = "FAQs";
     public static final String FEEDBACK_LABEL = "Give feedback";
     public static final String PRODUCT_ANNOUNCEMENTS_LABEL = "Show product announcements";
     public static final String LOCATION_SERVICES_LABEL = "Mozilla location services";
     public static final String HELTH_REPORT_LABEL = "(Fennec|Nightly|Aurora|Firefox Beta|Firefox) Health Report";
     public static final String MY_HEALTH_REPORT_LABEL = "View my Health Report";
 
     // Developer tools
+    public static final String PAINT_FLASHING_LABEL = "Paint flashing";
     public static final String REMOTE_DEBUGGING_LABEL = "Remote debugging";
     public static final String LEARN_MORE_LABEL = "Learn more";
 
     // Labels for the about:home tabs
     public static final String HISTORY_LABEL = "HISTORY";
     public static final String TOP_SITES_LABEL = "TOP SITES";
     public static final String BOOKMARKS_LABEL = "BOOKMARKS";
     public static final String READING_LIST_LABEL = "READING LIST";
--- a/mobile/android/base/tests/testSettingsMenuItems.java
+++ b/mobile/android/base/tests/testSettingsMenuItems.java
@@ -71,16 +71,24 @@ public class testSettingsMenuItems exten
         { StringHelper.FAQS_LABEL },
         { StringHelper.FEEDBACK_LABEL },
         { StringHelper.PRODUCT_ANNOUNCEMENTS_LABEL },
         { "Data choices" },
         { BRAND_NAME + " Health Report", "Shares data with Mozilla about your browser health and helps you understand your browser performance" },
         { StringHelper.MY_HEALTH_REPORT_LABEL },
     };
 
+    // Developer menu items.
+    String[] PATH_DEVELOPER = { StringHelper.DEVELOPER_TOOLS_SECTION_LABEL };
+    String[][] OPTIONS_DEVELOPER = {
+        { StringHelper.PAINT_FLASHING_LABEL },
+        { StringHelper.REMOTE_DEBUGGING_LABEL },
+        { StringHelper.LEARN_MORE_LABEL },
+    };
+
     /*
      * This sets up a hierarchy of settings to test.
      *
      * The keys are String arrays representing the path through menu items
      * (the single-item arrays being top-level categories), and each value
      * is a List of menu items contained within each category.
      *
      * Each menu item is itself an array as follows:
@@ -89,16 +97,17 @@ public class testSettingsMenuItems exten
      *  - string values of options that are displayed once clicked (optional).
      */
     public void setupSettingsMap(Map<String[], List<String[]>> settingsMap) {
         settingsMap.put(PATH_CUSTOMIZE, new ArrayList<String[]>(Arrays.asList(OPTIONS_CUSTOMIZE)));
         settingsMap.put(PATH_HOME, new ArrayList<String[]>(Arrays.asList(OPTIONS_HOME)));
         settingsMap.put(PATH_DISPLAY, new ArrayList<String[]>(Arrays.asList(OPTIONS_DISPLAY)));
         settingsMap.put(PATH_PRIVACY, new ArrayList<String[]>(Arrays.asList(OPTIONS_PRIVACY)));
         settingsMap.put(PATH_MOZILLA, new ArrayList<String[]>(Arrays.asList(OPTIONS_MOZILLA)));
+        settingsMap.put(PATH_DEVELOPER, new ArrayList<String[]>(Arrays.asList(OPTIONS_DEVELOPER)));
     }
 
     public void testSettingsMenuItems() {
         blockForGeckoReady();
 
         Map<String[], List<String[]>> settingsMenuItems = new HashMap<String[], List<String[]>>();
         setupSettingsMap(settingsMenuItems);