зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1539979 - Fix HTML Tooltip test for content frames r=gl
Depends on D40989 I though I fixed this a few months ago, but there are still timing issues with the current test when using a frame with type=content. Differential Revision: https://phabricator.services.mozilla.com/D40990 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
af9f2466e7
Коммит
33776481fd
|
@ -167,24 +167,24 @@ async function testClickInInnerIframe(doc) {
|
|||
|
||||
tooltip.panel.appendChild(iframe);
|
||||
|
||||
const onFrameLoad = new Promise(r => {
|
||||
iframe.addEventListener("load", r, true);
|
||||
});
|
||||
iframe.srcdoc = "<div id=test style='height:50px;'></div>";
|
||||
await onFrameLoad;
|
||||
|
||||
tooltip.setContentSize({ width: 100, height: 50 });
|
||||
await showTooltip(tooltip, doc.getElementById("box1"));
|
||||
|
||||
const target = iframe.contentWindow.document.documentElement;
|
||||
const onTooltipContainerClick = once(target, "click");
|
||||
iframe.srcdoc = "<div id=test style='height:50px'></div>";
|
||||
await new Promise(r => {
|
||||
const domHelper = new DOMHelpers(iframe.contentWindow);
|
||||
const frameLoad = () => {
|
||||
r();
|
||||
};
|
||||
domHelper.onceDOMReady(frameLoad);
|
||||
});
|
||||
|
||||
EventUtils.synthesizeMouseAtCenter(
|
||||
target,
|
||||
{},
|
||||
target.ownerDocument.defaultView
|
||||
);
|
||||
await onTooltipContainerClick;
|
||||
await waitUntil(() => iframe.contentWindow.document.getElementById("test"));
|
||||
|
||||
const target = iframe.contentWindow.document.getElementById("test");
|
||||
const onTooltipClick = once(target, "click");
|
||||
EventUtils.synthesizeMouseAtCenter(target, {}, target.ownerGlobal);
|
||||
await onTooltipClick;
|
||||
|
||||
is(tooltip.isVisible(), true, "Tooltip is still visible");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче