Bug 995696 - Ignore Content:PageShow with tabID of 0 in testNewTab; r=snorp
authorGeoff Brown <gbrown@mozilla.com>
Fri, 15 Aug 2014 13:28:35 -0600
changeset 199911 b4e84ff5a4671364c70a1ddf106a6ca1939d8825
parent 199910 926c83cd24f043df996f9d4808c2cc5f918b7d3a
child 199912 53e5b89085a483dc376b26fb6e73422c740343b8
push id27326
push userryanvm@gmail.com
push dateSat, 16 Aug 2014 21:43:28 +0000
treeherdermozilla-central@94ba78a42305 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs995696
milestone34.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 995696 - Ignore Content:PageShow with tabID of 0 in testNewTab; r=snorp
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));
             }
         }