From b34ac7abcf9b079122d199e4e6f947234e9f451a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Tue, 12 Jul 2022 14:46:53 +0000 Subject: [PATCH] Bug 1742797 - Fix intermittent test failures, r=hiro. Differential Revision: https://phabricator.services.mozilla.com/D151480 --- .../test/performance/browser_panel_vsync.js | 16 ++++++---------- layout/xul/nsMenuPopupFrame.cpp | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/browser/base/content/test/performance/browser_panel_vsync.js b/browser/base/content/test/performance/browser_panel_vsync.js index 11e95a61fcf3..9f9b478b4d74 100644 --- a/browser/base/content/test/performance/browser_panel_vsync.js +++ b/browser/base/content/test/performance/browser_panel_vsync.js @@ -38,16 +38,12 @@ add_task( DownloadsPanel.panel, "popuphidden" ); - EventUtils.synthesizeNativeMouseEvent({ - type: "click", - target: downloadsButton, - atCenter: true, - }); - - await Promise.all([ - hiddenPromise, - TestUtils.waitForCondition(() => !ChromeUtils.vsyncEnabled()), - ]); + EventUtils.synthesizeKey("VK_ESCAPE", {}, window); + await hiddenPromise; + await TestUtils.waitForCondition( + () => !ChromeUtils.vsyncEnabled(), + "wait for vsync to be disabled again" + ); ok(!ChromeUtils.vsyncEnabled(), "vsync should still be off"); is( diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp index 03763b914a0b..96fd7ab58fd1 100644 --- a/layout/xul/nsMenuPopupFrame.cpp +++ b/layout/xul/nsMenuPopupFrame.cpp @@ -1099,7 +1099,7 @@ void nsMenuPopupFrame::HidePopup(bool aDeselectMenu, nsPopupState aNewState) { mHFlip = mVFlip = false; if (auto* widget = GetWidget()) { - widget->ClearCachedWebrenderResources(); + widget->ClearWebrenderAnimationResources(); } nsView* view = GetView();