mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1403152 - fix test browser_html_tooltip_xul-wrapper.js for small viewports;r=me
MozReview-Commit-ID: A1W1LCDjupO --HG-- extra : rebase_source : 30fceb0a393c767a839a554135143c1f235c0121
This commit is contained in:
parent
fa921ed2a3
commit
4c5032bb5b
@ -26,10 +26,19 @@ add_task(function* () {
|
||||
|
||||
let [, win, doc] = yield createHost("bottom", TEST_URI);
|
||||
|
||||
info("Resizing window to have some space below the window.");
|
||||
info("Resize and move the window to have space below.");
|
||||
let originalWidth = win.top.outerWidth;
|
||||
let originalHeight = win.top.outerHeight;
|
||||
win.top.resizeBy(0, -100);
|
||||
win.top.resizeBy(-100, -200);
|
||||
let originalTop = win.top.screenTop;
|
||||
let originalLeft = win.top.screenLeft;
|
||||
win.top.moveTo(100, 100);
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
info("Restore original window dimensions and position.");
|
||||
win.top.resizeTo(originalWidth, originalHeight);
|
||||
win.top.moveTo(originalTop, originalLeft);
|
||||
});
|
||||
|
||||
info("Create HTML tooltip");
|
||||
let tooltip = new HTMLTooltip(doc, {useXulWrapper: true});
|
||||
@ -55,9 +64,6 @@ add_task(function* () {
|
||||
is(tooltip.isVisible(), false, "Tooltip is not visible");
|
||||
|
||||
tooltip.destroy();
|
||||
|
||||
info("Restore original window dimensions.");
|
||||
win.top.resizeTo(originalWidth, originalHeight);
|
||||
});
|
||||
|
||||
function checkTooltip(tooltip, position, height) {
|
||||
|
Loading…
Reference in New Issue
Block a user