Bug 934646 - Replace hard-coded Android resource ID. r=mfinkle
☠☠ backed out by 7f841e04273d ☠ ☠
authorNick Alexander <nalexander@mozilla.com>
Thu, 07 Nov 2013 15:01:54 -0500
changeset 156427 4ae3d82562fac4ecdf6ead19326033f0cfd60e61
parent 156426 5dd946b1f29b2a629d94ee806c684d95cc1545da
child 156428 a829f4d2584acc2ebcd2e72418c9274897323710
push id25678
push userryanvm@gmail.com
push dateWed, 20 Nov 2013 03:26:13 +0000
treeherdermozilla-central@4f993fa378eb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs934646
milestone28.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 934646 - Replace hard-coded Android resource ID. r=mfinkle
mobile/android/base/tests/testReaderMode.java
--- a/mobile/android/base/tests/testReaderMode.java
+++ b/mobile/android/base/tests/testReaderMode.java
@@ -16,16 +16,19 @@ import org.json.JSONObject;
  * checks the reader toolbar functionality(share, add/remove to reading list, go to reading list)
  * accessing a page from reading list menu, checks that the reader icon is associated in History tab
  * and that the reading list is properly populated after adding or removing reader items
  */
 public class testReaderMode extends AboutHomeTest {
     static final int EVENT_CLEAR_DELAY_MS = 3000;
     static final int READER_ICON_MAX_WAIT_MS = 15000;
 
+    // IDs for UI views.
+    private static final String PAGE_ACTION_LAYOUT_ID = "page_action_layout";
+
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
     public void testReaderMode() {
         blockForGeckoReady();
 
         Actions.EventExpecter contentEventExpecter;
@@ -148,17 +151,17 @@ public class testReaderMode extends Abou
         openAboutHomeTab(AboutHomeTabs.READING_LIST);
         list = findListViewWithTag("reading_list");
         child = list.getChildAt(childNo-1);
         mAsserter.ok(child == null, "Verify if the Reading List is empty", "The Reading List is empty");
     }
 
     // Get the reader icon method
     protected View getReaderIcon() {
-        View pageActionLayout = mSolo.getView(0x7f070025);
+        View pageActionLayout = mSolo.getView(PAGE_ACTION_LAYOUT_ID);
         final ViewGroup actionLayoutEntry = (ViewGroup)pageActionLayout;
         View icon = actionLayoutEntry.getChildAt(1);
         if (icon == null || icon.getVisibility() != View.VISIBLE) {
             // wait for the view to be visible, otherwise it may not respond
             // to clicks -- see bug 927578
             mAsserter.dumpLog("reader icon not visible -- waiting for visibility");
             Condition visibilityCondition = new Condition() {
                 @Override