зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1407945) for failures on browser_tooltip.js CLOSED TREE
Backed out changeset 2ea007508cd3 (bug 1407945) Backed out changeset 43553c5c7033 (bug 1407945)
This commit is contained in:
Родитель
44c1524bcd
Коммит
05b45758c3
|
@ -5410,23 +5410,12 @@ var XULBrowserWindow = {
|
|||
elt.label = tooltip;
|
||||
elt.style.direction = direction;
|
||||
|
||||
let screenX;
|
||||
let screenY;
|
||||
|
||||
if (browser instanceof XULElement) {
|
||||
// XUL element such as <browser> has the `screenX` and `screenY` fields.
|
||||
// https://searchfox.org/mozilla-central/source/dom/webidl/XULElement.webidl
|
||||
screenX = browser.screenX;
|
||||
screenY = browser.screenY;
|
||||
} else {
|
||||
// In case of HTML element such as <iframe> which RDM uses,
|
||||
// calculate the coordinate manually since it does not have the fields.
|
||||
const componentBounds = browser.getBoundingClientRect();
|
||||
screenX = window.screenX + componentBounds.x;
|
||||
screenY = window.screenY + componentBounds.y;
|
||||
}
|
||||
|
||||
elt.openPopupAtScreen(screenX + x, screenY + y, false, null);
|
||||
elt.openPopupAtScreen(
|
||||
browser.screenX + x,
|
||||
browser.screenY + y,
|
||||
false,
|
||||
null
|
||||
);
|
||||
},
|
||||
|
||||
hideTooltip() {
|
||||
|
|
|
@ -76,8 +76,6 @@ skip-if = fission
|
|||
skip-if = os == "linux" || os == "mac" # Bug 1498336
|
||||
[browser_toolbox_swap_browsers.js]
|
||||
[browser_toolbox_swap_inspector.js]
|
||||
[browser_tooltip.js]
|
||||
skip-if = os == "mac" && debug # Bug 1569508
|
||||
[browser_touch_device.js]
|
||||
[browser_touch_does_not_trigger_hover_states.js]
|
||||
[browser_touch_simulation.js]
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
const TEST_CONTENT = `<h1 title="test title">test h1</h1>`;
|
||||
const TEST_URL = `data:text/html;charset=utf-8,${ TEST_CONTENT }`;
|
||||
|
||||
// Test for the tooltip coordinate on the browsing document in RDM.
|
||||
|
||||
addRDMTask(TEST_URL, async ({ ui }) => {
|
||||
await injectEventUtilsInContentTask(ui.getViewportBrowser());
|
||||
|
||||
info("Show a tooltip");
|
||||
await spawnViewportTask(ui, {}, async () => {
|
||||
const target = content.document.querySelector("h1");
|
||||
await EventUtils.synthesizeMouse(
|
||||
target, 1, 1, { type: "mouseover", isSynthesized: false }, content
|
||||
);
|
||||
await EventUtils.synthesizeMouse(
|
||||
target, 2, 1, { type: "mousemove", isSynthesized: false }, content
|
||||
);
|
||||
await EventUtils.synthesizeMouse(
|
||||
target, 3, 1, { type: "mousemove", isSynthesized: false }, content
|
||||
);
|
||||
});
|
||||
|
||||
info("Wait for showing the tooltip");
|
||||
const tooltip =
|
||||
ui.browserWindow.gBrowser.ownerDocument.getElementById("remoteBrowserTooltip");
|
||||
await waitUntil(() => tooltip.state === "open");
|
||||
|
||||
info("Test the X coordinate of the tooltip");
|
||||
isnot(tooltip.screenX, 0, "The X coordinate of tooltip should not be 0");
|
||||
});
|
Загрузка…
Ссылка в новой задаче