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 394063 6fa30faf379173a45cda1c400a15e4849b94013a
parent 394062 4285ead0e57a8372d81dd76cf5a4182c3bd3e1fb
child 394064 3e542f18ed6278e1285cae899453679841ea5296
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahunt
bugs1337940
milestone54.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 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);