void (int w, int h, int speed, int delay) { String htmlPath = PlatformTestUtil.getPlatformTestDataPath() + "ui/jcef/long_page.html"; String url = "file://" + htmlPath; _testImpl(w, h, (f)->{ try { Robot robot = new Robot(); robot.setAutoDelay(0); Rectangle r = f.getBounds(); robot.mouseMove((int)r.getCenterX(), (int)r.getCenterY()); robot.delay(500); final long startMs = System.currentTimeMillis(); while (System.currentTimeMillis() - startMs < 20*1000) { robot.mouseWheel(-speed); robot.delay(delay); } } catch (AWTException e) { throw new RuntimeException(e); } }, url, String.format("test_scroll_fps_%dx%d_speed%d.csv", w, h, speed)); }