Bug 1337940 - Part 2 - Make session store form data test work again. r=ahunt
☠☠ backed out by c53368e7d1a3 ☠ ☠
authorJan Henning <jh+bugzilla@buttercookie.de>
Mon, 13 Feb 2017 22:16:36 +0100
changeset 373070 dd8c7da15822a815cf7072e1b19a01eeba3cf1af
parent 373069 0172497c1024e8ed758e6aea7bb5d87ca8aec6e5
child 373071 28c5827d707c260e8a0a6d3000d7d31d3ac65e77
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);