< prev index next >
tests/system/src/test/java/test/com/sun/javafx/application/SwingExitCommon.java
Print this page
rev 9491 : 8145203: Refactor systemTests for clear separation of tests
Reviewed-by: kcr
*** 21,32 ****
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! package com.sun.javafx.application;
import java.awt.BorderLayout;
import javax.swing.SwingUtilities;
import java.awt.Dimension;
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.CountDownLatch;
--- 21,33 ----
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! package test.com.sun.javafx.application;
+ import com.sun.javafx.application.PlatformImplShim;
import java.awt.BorderLayout;
import javax.swing.SwingUtilities;
import java.awt.Dimension;
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.CountDownLatch;
*** 36,49 ****
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javax.swing.JFrame;
import junit.framework.AssertionFailedError;
! import util.Util;
import static org.junit.Assert.*;
! import static util.Util.TIMEOUT;
/**
* Test program for Platform implicit exit behavior using an embedded JFXPanel.
* Each of the tests must be run in a separate JVM which is why each
* is in its own subclass.
--- 37,50 ----
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javax.swing.JFrame;
import junit.framework.AssertionFailedError;
! import test.util.Util;
import static org.junit.Assert.*;
! import static test.util.Util.TIMEOUT;
/**
* Test program for Platform implicit exit behavior using an embedded JFXPanel.
* Each of the tests must be run in a separate JVM which is why each
* is in its own subclass.
*** 131,141 ****
AssertionFailedError err = new AssertionFailedError("Exception while disposing JFrame");
err.initCause(ex.getCause());
throw err;
}
! final CountDownLatch exitLatch = PlatformImpl.test_getPlatformExitLatch();
if (reEnableImplicitExit) {
Thread.sleep(SLEEP_TIME);
assertEquals(1, exitLatch.getCount());
assertFalse(Platform.isImplicitExit());
--- 132,142 ----
AssertionFailedError err = new AssertionFailedError("Exception while disposing JFrame");
err.initCause(ex.getCause());
throw err;
}
! final CountDownLatch exitLatch = PlatformImplShim.test_getPlatformExitLatch();
if (reEnableImplicitExit) {
Thread.sleep(SLEEP_TIME);
assertEquals(1, exitLatch.getCount());
assertFalse(Platform.isImplicitExit());
< prev index next >