Bug 995696 - Ignore Content:PageShow with tabID of 0 in testNewTab. r=snorp, a=test-only
authorGeoff Brown <gbrown@mozilla.com>
Fri, 15 Aug 2014 13:28:35 -0600
changeset 217696 181adde439462478c976cba134e4c2a9ef9f6d77
parent 217695 b09553fc5f332a911acf132d9c9d23582ee5f24f
child 217697 8cfc1d88c42c56006fd33cba828cee4fd38fd872
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)
reviewerssnorp, test-only
bugs995696
milestone33.0a2
Bug 995696 - Ignore Content:PageShow with tabID of 0 in testNewTab. r=snorp, a=test-only
mobile/android/base/tests/BaseTest.java
--- a/mobile/android/base/tests/BaseTest.java
+++ b/mobile/android/base/tests/BaseTest.java
@@ -558,16 +558,20 @@ abstract class BaseTest extends BaseRobo
         mAsserter.ok(success, "waiting for add tab view", "add tab view available");
         final Actions.RepeatedEventExpecter pageShowExpecter = mActions.expectGeckoEvent("Content:PageShow");
         mSolo.clickOnView(mSolo.getView(R.id.add_tab));
         // Wait until we get a PageShow event for a new tab ID
         for(;;) {
             try {
                 JSONObject data = new JSONObject(pageShowExpecter.blockForEventData());
                 int tabID = data.getInt("tabID");
+                if (tabID == 0) {
+                    mAsserter.dumpLog("addTab ignoring PageShow for tab 0");
+                    continue;
+                }
                 if (!mKnownTabIDs.contains(tabID)) {
                     mKnownTabIDs.add(tabID);
                     break;
                 }
             } catch(JSONException e) {
                 mAsserter.ok(false, "Exception in addTab", getStackTraceString(e));
             }
         }