On Fri, 7 May 2021 20:53:08 GMT, Alexander Zuev <kiz...@openjdk.org> wrote:

> 
> 
> > I'm not sure about this change...Maybe changing frame location from (0,0) 
> > at l192 to middle of screen though selLocationRelativeTo() may be enough to 
> > make the test more stable in CI systems.
> 
> The problem here is not only in location but in the screenshot taking area 
> outside of the popup and analyzing it. That is one of the reasons why test is 
> unreliable - it analyzes the wrong place. And moving frame to the different 
> position will not help either - the problem is not that system menubar 
> overlaps the popup - it does not, the problem is that we are catching part of 
> the menubar because we do not adjust for the offset it introduces to the 
> screen coordinates. Here's the screenshot, note that area we are analyzing is 
> one outlined with cyan borders. By not adjusting the location we just 
> catching random stuff.
> ![dev0scr0](https://user-images.githubusercontent.com/69642324/117507970-acfb9700-af3c-11eb-8791-a1fe62e140a9.png)

OK...I will still urge to bring the frame to middle to be more safe.
BTW, greenFrame and redFrame screencapture are needed only in failure case so I 
guess those should be called if compare fails.
Also, dispose should be called in EDT same way we are doing a little bit 
afterwards..

-------------

PR: https://git.openjdk.java.net/jdk/pull/3844

Reply via email to