--- old/tests/system/src/test/java/com/sun/glass/ui/monocle/TestApplication.java 2014-07-31 17:33:26.623656041 +0300 +++ new/tests/system/src/test/java/com/sun/glass/ui/monocle/TestApplication.java 2014-07-31 17:33:26.399656038 +0300 @@ -116,22 +116,26 @@ return root; } - public static void showFullScreenScene() throws Exception { + public static void showScene(Rectangle2D bounds) throws Exception { TestApplication.getStage(); frameWait(2); new TestRunnable() { @Override public void test() throws Exception { - Rectangle2D bounds = Screen.getPrimary().getVisualBounds(); - stage.setX(0.0); - stage.setY(0.0); - stage.setWidth(bounds.getWidth()); - stage.setHeight(bounds.getHeight()); - Rectangle r = new Rectangle(bounds.getWidth(), bounds.getHeight()); + Rectangle2D stageBounds = bounds; + if (stageBounds == null) { + Rectangle2D screenBounds = Screen.getPrimary().getVisualBounds(); + stageBounds = new Rectangle2D(0, 0, screenBounds.getWidth(), screenBounds.getHeight()); + } + stage.setX(stageBounds.getMinX()); + stage.setY(stageBounds.getMinY()); + stage.setWidth(stageBounds.getWidth()); + stage.setHeight(stageBounds.getHeight()); + Rectangle r = new Rectangle(stageBounds.getWidth(), stageBounds.getHeight()); r.setFill(Color.BLUE); root = new Group(); root.getChildren().add(r); - Scene scene = new Scene(root, bounds.getWidth(), bounds.getHeight()); + Scene scene = new Scene(root, stageBounds.getWidth(), stageBounds.getHeight()); stage.setScene(scene); stage.show(); stage.requestFocus(); @@ -140,6 +144,10 @@ frameWait(2); } + public static void showFullScreenScene() throws Exception { + showScene(null); + } + public static void showInMiddleOfScreen() throws Exception { TestApplication.getStage(); // wait for events to finish being delivered to the previous scene