modules/graphics/src/test/java/javafx/scene/effect/EffectInputTest.java
Print this page
rev 6167 : RT-35330 [Monocle] Remove StubToolkit and replace it with headless glass implementation
*** 33,60 ****
--- 33,66 ----
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+ import com.sun.javafx.FXUnit;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
+ import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import com.sun.javafx.pgstub.StubToolkit;
import com.sun.javafx.tk.Toolkit;
@RunWith(Parameterized.class)
public class EffectInputTest {
+
+ @Rule
+ public FXUnit fx = new FXUnit();
+
private String effect1Name = null;
private String effect2Name = null;
private Node n = null;
final static String[] effects = new String[] {
*** 75,93 ****
--- 81,101 ----
return list;
}
public EffectInputTest(final String effect1,
final String effect2) {
+ fx.invokeAndWait(() -> {
this.effect1Name = effect1;
this.effect2Name = effect2;
Group root = new Group();
Scene scene = new Scene(root);
Stage stage = new Stage();
stage.setScene(scene);
stage.show();
n = new Rectangle();
root.getChildren().add(n);
+ });
}
private void pulse() {
((StubToolkit) Toolkit.getToolkit()).fireTestPulse();
}