Bug 1480953 - Force disabling tab animations in DAMP. r=jdescottes

We used to have animations during tab opening/closing, but this was introducing
intermittents as we were not correctly waiting for animation's end.

MozReview-Commit-ID: 2mscsA8Uosd

Differential Revision: https://phabricator.services.mozilla.com/D10263

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alexandre Poirot 2018-10-31 14:42:48 +00:00
parent cf5528ffe5
commit b13236fd51
2 changed files with 7 additions and 12 deletions

View File

@ -157,7 +157,10 @@ Damp.prototype = {
},
async addTab(url) {
let tab = this._win.gBrowser.selectedTab = this._win.gBrowser.addTrustedTab(url);
// Disable opening animation to avoid intermittents and prevent having to wait for
// animation's end. (See bug 1480953)
let tab = this._win.gBrowser.selectedTab = this._win.gBrowser.addTrustedTab(url,
{ skipAnimation: true });
let browser = tab.linkedBrowser;
await awaitBrowserLoaded(browser);
return tab;
@ -177,11 +180,6 @@ Damp.prototype = {
window.performance.measure("pending paints", "pending paints.start");
},
closeCurrentTab() {
this._win.BrowserCloseTabOrWindow();
return this._win.gBrowser.selectedTab;
},
reloadPage(onReload) {
return new Promise(resolve => {
let browser = gBrowser.selectedBrowser;
@ -203,7 +201,9 @@ Damp.prototype = {
},
async testTeardown(url) {
this.closeCurrentTab();
// Disable closing animation to avoid intermittents and prevent having to wait for
// animation's end. (See bug 1480953)
this._win.gBrowser.removeCurrentTab({ animate: false });
// Force freeing memory now so that it doesn't happen during the next test
await this.garbageCollect();

View File

@ -23,10 +23,5 @@ module.exports = async function() {
await closeToolboxAndLog("complicated.netmonitor", toolbox);
// After switching TabClient to a Front, DAMP became frequently intermittent on
// windows pgo builds (https://bugzilla.mozilla.org/show_bug.cgi?id=1480953).
// Pausing before switching to the next test seems to fix the issue.
await new Promise(r => setTimeout(r, 1000));
await testTeardown();
};