From 72bf4c9c366a37045a2dbd851bdc5eb670a7d1f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 25 Apr 2019 22:46:42 +0200 Subject: [PATCH] Bug 1440537 - Fix a web-extensions test that relies on layout flushes working across cross-origin iframes. r=kmag Same as the previous commit, I could make sendMouseEvent do something fancy / special, but I'd rather not, since it's trivially fixable in the test. Differential Revision: https://phabricator.services.mozilla.com/D28911 --- .../test/mochitest/test_ext_new_tab_processType.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toolkit/components/extensions/test/mochitest/test_ext_new_tab_processType.html b/toolkit/components/extensions/test/mochitest/test_ext_new_tab_processType.html index 0cc501548446..e126ee7ff6e3 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_new_tab_processType.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_new_tab_processType.html @@ -63,6 +63,9 @@ add_task(async function test_target_blank_link() { let link = win.document.getElementById("link"); { + // Flush layout so that synthesizeMouseAtCenter on a cross-origin iframe + // works as expected. + document.body.getBoundingClientRect(); synthesizeMouseAtCenter(link, {}, iframe.contentWindow); let {subject: doc} = await promiseObserved("document-element-inserted", doc => doc.documentURI === linkURL); info("Link opened");