On Thu, 19 Dec 2019 14:32:32 GMT, Thiago Milczarek Sayao <[email protected]> wrote:
>> https://bugs.openjdk.java.net/browse/JDK-8232811 >> >> This one was hard to tackle. >> >> ./gradlew -PFULL_TEST=true -PUSE_ROBOT=true :systemTests:test --tests >> test.robot.javafx.scene.dialog.DialogWithOwnerSizingTest > > The pull request has been updated with 1 additional commit. The fix itself looks good. suggested some changes in test and a query. Please take a look. tests/system/src/test/java/test/robot/javafx/scene/dialog/DialogWithOwnerSizingTest.java line 34: > 33: import javafx.scene.control.Dialog; > 34: import javafx.scene.control.DialogEvent; > 35: import javafx.scene.robot.Robot; DialogEvent is not used in program, please remove the import. tests/system/src/test/java/test/robot/javafx/scene/dialog/DialogWithOwnerSizingTest.java line 50: > 49: > 50: //see JDK8193502 > 51: public class DialogWithOwnerSizingTest { Please change to JDK-8193502 tests/system/src/test/java/test/robot/javafx/scene/dialog/DialogWithOwnerSizingTest.java line 64: > 63: public void dialogWithOwnerSizingTest() throws Exception { > 64: Thread.sleep(500); > 65: clickButton(); This `sleep()` can be removed. tests/system/src/test/java/test/robot/javafx/scene/dialog/DialogWithOwnerSizingTest.java line 87: > 86: }); > 87: Thread.sleep(600); > 88: waitForLatch(dialogHideLatch, 10, "Failed to hide Dialog"); This `sleep()` can be removed too. anyway `dailogHideLatch` will synchronize. tests/system/src/test/java/test/robot/javafx/scene/dialog/DialogWithOwnerSizingTest.java line 77: > 76: > 77: Thread.sleep(400); > 78: waitForLatch(dialogShownLatch, 10, "Failed to show Dialog"); This sleep() can be removed too. anyway `dailogShowLatch `will synchronize. modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp line 1062: > 1061: geometry.final_height.type = BOUNDSTYPE_CONTENT; > 1062: } > 1063: So now `geometry.final_width.value` and `geometry.final_height.value` will be set after the `Dialog `is displayed on screen. Does this mean that, the `Dialog` will be resized after it is displayed ? I did not observe any size change visually. An observation unrelated to this change: `Dialog` changes it's position after being displayed. It can not be observed always, but is very frequent. Should be easy to observe it on a slow machine. On the same machine, I did not observe any size change though. ------------- Changes requested by arapte (Reviewer). PR: https://git.openjdk.java.net/jfx/pull/63
