JBR-3572 Wayland: java/awt/Window/WindowTitleVisibleTest/WindowTitleVisibleTestLinuxGnome.java: title bar shown and hidden are the same.

Exclude the test when running under XWayland that doesn't implement
screen capture necessary for the test to function.

(cherry picked from commit 4326028811)
This commit is contained in:
Maxim Kartashev
2021-07-05 07:59:22 -07:00
committed by jbrbot
parent 59c1e1e7e0
commit 0bfea0eb57
3 changed files with 11 additions and 1 deletions

View File

@@ -120,7 +120,8 @@ requires.properties= \
jdk.foreign.linker \
jlink.runtime.linkable \
jlink.packagedModules \
jdk.static
jdk.static \
display.XWayland
# Minimum jtreg version
requiredVersion=8.1+1

View File

@@ -29,6 +29,7 @@
* Note: the test requires GNOME Shell window manager and will automatically
* pass with any other WM.
* @requires (os.family == "linux")
* @requires !display.XWayland
* @run main WindowTitleVisibleTestLinuxGnome
*/

View File

@@ -148,6 +148,7 @@ public class VMProps implements Callable<Map<String, String>> {
map.put("jdk.foreign.linker", this::jdkForeignLinker);
map.put("jlink.packagedModules", this::packagedModules);
map.put("jdk.static", this::isStatic);
map.put("display.XWayland", this::displayXWayland);
vmGC(map); // vm.gc.X = true/false
vmGCforCDS(map); // may set vm.gc
vmOptFinalFlags(map);
@@ -847,6 +848,13 @@ public class VMProps implements Callable<Map<String, String>> {
return Boolean.toString(WB.isStatic());
}
protected String displayXWayland() {
final boolean isXWayland = (System.getenv("WAYLAND_DISPLAY") != null)
&& (System.getenv("DISPLAY") != null);
return String.valueOf(isXWayland);
}
/**
* Dumps the map to the file if the file name is given as the property.
* This functionality could be helpful to know context in the real