changeset 5230:04dfdd1ed7be

[TEST-ONLY] RT-33103 unit test
author David Grieve<david.grieve@oracle.com>
date Wed, 02 Oct 2013 15:26:04 -0400
parents bd2f3d13cbf7
children 48e93b84056d
files modules/controls/src/test/java/javafx/scene/control/MiscellaneousTests.java
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/test/java/javafx/scene/control/MiscellaneousTests.java	Wed Oct 02 12:18:50 2013 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/MiscellaneousTests.java	Wed Oct 02 15:26:04 2013 -0400
@@ -5,12 +5,14 @@
 import com.sun.javafx.tk.Toolkit;
 import javafx.scene.Group;
 import javafx.scene.Scene;
+import javafx.scene.layout.HBox;
 import javafx.scene.shape.Rectangle;
 import javafx.stage.Stage;
 import org.junit.Test;
 
 import static junit.framework.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
 
 /**
  * Created with IntelliJ IDEA.
@@ -67,4 +69,24 @@
         assertNotNull(button.getBackground());
 
     }
+
+    @Test public void test_RT_33103() {
+
+        HBox box = new HBox();
+
+        TextField field = new TextField();
+        Label badLabel = new Label("Field:", field);
+
+        box.getChildren().addAll(badLabel, field);
+
+        Scene scene = new Scene(box);
+        Stage stage = new Stage();
+        stage.setScene(scene);
+        stage.show();
+
+        ((StubToolkit)Toolkit.getToolkit()).fireTestPulse();
+
+        assertSame(badLabel, field.getParent());
+
+    }
 }