browser_876926_customize_mode_wrapping.js fails when run on a screen so small that new nodes scroll out of view in the palette / toolbox

RESOLVED FIXED in Firefox 57

Status

()

defect
RESOLVED FIXED
2 years ago
11 months ago

People

(Reporter: Nika, Assigned: Gijs)

Tracking

unspecified
Firefox 57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment)

It appears to create a button with no wrapper while in customize mode, and then try to drag its parent (which it assumes is its wrapper).

It seems like on infra this happens to work out, because the button is in the center of the palette, but on my machine at least it definitely doesn't work, instead dragging random other buttons.
This test wfm when run in the dir or individually on both my windows and osx machines. Can you give more specifics about what machine and screen size you're running it on where it doesn't work, and in which subtest it's failing?
Flags: needinfo?(michael)
I run my tests locally within a vnc4server on a linux box. The screen resolution when I was doing the run was 1024x768px, although there is also a dock and titlebar which take up some of the screen, so the actual resolution was even lower.
Flags: needinfo?(michael)
The issue seems to be that when trying to drag these nodes, they are scrolled out of view at the bottom of customize mode, which the code doesn't deal with.
Summary: browser_876926_customize_mode_wrapping.js fails when run locally → browser_876926_customize_mode_wrapping.js fails when run on a screen so small that new nodes scroll out of view in the palette / toolbox
Comment on attachment 8905200 [details]
Bug 1396966 - fix dnd in a test to work in small screens,

https://reviewboard.mozilla.org/r/176962/#review182054

::: browser/components/customizableui/test/browser_876926_customize_mode_wrapping.js:26
(Diff revision 1)
> +      nodeToMove.scrollIntoView();
> +      window.QueryInterface(Ci.nsIInterfaceRequestor);
> +      let dwu = window.getInterface(Ci.nsIDOMWindowUtils);
> +      await BrowserTestUtils.waitForCondition(() => {
> +        let nodeBounds = dwu.getBoundsWithoutFlushing(nodeToMove);
> +        let paletteBounds = dwu.getBoundsWithoutFlushing(gNavToolbox.palette);
> +        return nodeBounds.top >= paletteBounds.top && nodeBounds.bottom <= paletteBounds.bottom;
> +      });

Please factor this out into a separate function so that it isn't duplicated between this and dragToItem.
Attachment #8905200 - Flags: review?(michael) → review+
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/89efc702a4f2
fix dnd in a test to work in small screens, r=mystor
https://hg.mozilla.org/mozilla-central/rev/89efc702a4f2
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Assignee: nobody → gijskruitbosch+bugs
You need to log in before you can comment on or make changes to this bug.