diff --git a/src/test/java/com/openfin/desktop/WindowTest.java b/src/test/java/com/openfin/desktop/WindowTest.java index c7b2d09..24a7725 100644 --- a/src/test/java/com/openfin/desktop/WindowTest.java +++ b/src/test/java/com/openfin/desktop/WindowTest.java @@ -783,4 +783,28 @@ public void onError(Ack ack) { latch.await(10, TimeUnit.SECONDS); assertEquals("reload test timeout", 0, latch.getCount()); } + + @Test + public void acceleratorSetting() throws Exception { + ApplicationOptions options = TestUtils.getAppOptions(null); + AcceleratorOptions acceleratorOptions = new AcceleratorOptions(); + acceleratorOptions.setDevtools(true); + acceleratorOptions.setReload(false); + acceleratorOptions.setReloadIgnoringCache(true); + acceleratorOptions.setZoom(false); + options.getMainWindowOptions().setAccelerator(acceleratorOptions); + + Application application = TestUtils.runApplication(options, desktopConnection); + Window window = application.getWindow(); + CountDownLatch latch = new CountDownLatch(1); + + window.getOptions(winOpts -> { + AcceleratorOptions opt = winOpts.getAccelerator(); + if (opt != null && opt.isDevtools() && !opt.isReload() && opt.isReloadIgnoringCache() && !opt.isZoom()) { + latch.countDown(); + } + }, null); + latch.await(10, TimeUnit.SECONDS); + assertEquals("acceleratorSetting test timeout", 0, latch.getCount()); + } }