Bug 1337940 - Part 2 - Make session store form data test work again. r=ahunt
authorJan Henning <jh+bugzilla@buttercookie.de>
Mon, 13 Feb 2017 22:16:36 +0100
changeset 374113 6fa30faf379173a45cda1c400a15e4849b94013a
parent 374112 4285ead0e57a8372d81dd76cf5a4182c3bd3e1fb
child 374114 3e542f18ed6278e1285cae899453679841ea5296
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahunt
bugs1337940
milestone54.0a1
Bug 1337940 - Part 2 - Make session store form data test work again. r=ahunt Collecting data for history changes causes an additional session store data update for that tab when navigating back, which needs to be accounted for in this test. Therefore we now also wait for DOMTitleChanged before assuming that the tab has navigated to its intended location. MozReview-Commit-ID: FDNQednXPWh
mobile/android/tests/browser/chrome/test_session_form_data.html
--- a/mobile/android/tests/browser/chrome/test_session_form_data.html
+++ b/mobile/android/tests/browser/chrome/test_session_form_data.html
@@ -220,17 +220,21 @@ add_task(function* test_formdata_navigat
       // Visit a different page.
       gBrowserApp.loadURI(otherURL, browser);
       yield promiseBrowserEvent(browser, "DOMContentLoaded");
       is(browser.currentURI.spec, otherURL, "navigated to a different page");
 
       // Go back.
       is(browser.canGoBack, true, "can go back");
       browser.goBack();
-      yield promiseTabEvent(browser, "SSTabDataUpdated");
+
+      let titleChange = promiseTabEvent(browser, "DOMTitleChanged");
+      let tabDataUpdate = promiseTabEvent(browser, "SSTabDataUpdated");
+      yield titleChange;
+      yield tabDataUpdate;
       is(browser.currentURI.spec, URL, "navigated back to form data page");
 
       // Make sure form data is still present.
       is(getInputValue(browser, {id: "txt"}), OUTER_VALUE, "outer value present after navigation");
       is(getInputValue(browser, {id: "txt", frame: 0}), INNER_VALUE, "inner value present after navigation");
 
       // Remove the tab.
       gBrowserApp.closeTab(tab);