File tree Expand file tree Collapse file tree 1 file changed +14
-18
lines changed
src/test/java/com/openfin/desktop Expand file tree Collapse file tree 1 file changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -715,40 +715,36 @@ public void blur() throws Exception {
715715 CountDownLatch latch = new CountDownLatch (1 );
716716
717717 window .addEventListener ("blurred" , new EventListener () {
718-
719718 @ Override
720719 public void eventReceived (ActionEvent e ) {
721720 if ("blurred" .equals (e .getType ())) {
722721 latch .countDown ();
723722 }
724723 }
725724 }, new AckListener () {
726-
727725 @ Override
728726 public void onSuccess (Ack ack ) {
727+ window .focus (new AckListener () {
728+ @ Override
729+ public void onSuccess (Ack ack ) {
730+ try {
731+ window .blur ();
732+ }
733+ catch (DesktopException e ) {
734+ e .printStackTrace ();
735+ }
736+ }
737+ @ Override
738+ public void onError (Ack ack ) {
739+ }
740+ });
729741 }
730742
731743 @ Override
732744 public void onError (Ack ack ) {
733745 }
734746 });
735747
736- window .focus (new AckListener () {
737-
738- @ Override
739- public void onSuccess (Ack ack ) {
740- try {
741- window .blur ();
742- }
743- catch (DesktopException e ) {
744- e .printStackTrace ();
745- }
746- }
747-
748- @ Override
749- public void onError (Ack ack ) {
750- }
751- });
752748 latch .await (10 , TimeUnit .SECONDS );
753749 assertEquals ("blur test timeout" , 0 , latch .getCount ());
754750
You can’t perform that action at this time.
0 commit comments