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
This commit is contained in:
Emilio Cobos Álvarez 2019-04-25 22:46:42 +02:00
Родитель bcd4ae91c9
Коммит 72bf4c9c36
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -63,6 +63,9 @@ add_task(async function test_target_blank_link() {
let link = win.document.getElementById("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); synthesizeMouseAtCenter(link, {}, iframe.contentWindow);
let {subject: doc} = await promiseObserved("document-element-inserted", doc => doc.documentURI === linkURL); let {subject: doc} = await promiseObserved("document-element-inserted", doc => doc.documentURI === linkURL);
info("Link opened"); info("Link opened");