mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-14 09:53:18 +00:00
8198335: java/awt/FullScreen/UninitializedDisplayModeChangeTest/UninitializedDisplayModeChangeTest.java fails in headless mode
Reviewed-by: prr
This commit is contained in:
parent
239ec10926
commit
97d533e06b
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,6 +47,7 @@ import sun.awt.AppContext;
|
||||
import sun.awt.AWTAutoShutdown;
|
||||
import sun.awt.AWTPermissions;
|
||||
import sun.awt.AppContext;
|
||||
import sun.awt.DisplayChangedListener;
|
||||
import sun.awt.LightweightFrame;
|
||||
import sun.awt.SunToolkit;
|
||||
import sun.awt.util.ThreadGroupUtils;
|
||||
@ -802,9 +803,10 @@ public final class WToolkit extends SunToolkit implements Runnable {
|
||||
public native int getMaximumCursorColors();
|
||||
|
||||
static void paletteChanged() {
|
||||
((Win32GraphicsEnvironment)GraphicsEnvironment
|
||||
.getLocalGraphicsEnvironment())
|
||||
.paletteChanged();
|
||||
Object lge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
if (lge instanceof DisplayChangedListener) {
|
||||
((DisplayChangedListener) lge).paletteChanged();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -816,9 +818,10 @@ public final class WToolkit extends SunToolkit implements Runnable {
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
((Win32GraphicsEnvironment)GraphicsEnvironment
|
||||
.getLocalGraphicsEnvironment())
|
||||
.displayChanged();
|
||||
Object lge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
if (lge instanceof DisplayChangedListener) {
|
||||
((DisplayChangedListener) lge).displayChanged();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -171,7 +171,6 @@ java/awt/LightweightComponent/LightweightEventTest/LightweightEventTest.java 815
|
||||
java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java 6990210 generic-all
|
||||
java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.html 4931413 windows-all
|
||||
java/awt/FullScreen/FullScreenInsets/FullScreenInsets.java 7019055 windows-all
|
||||
java/awt/FullScreen/UninitializedDisplayModeChangeTest/UninitializedDisplayModeChangeTest.java 8198335 windows-all
|
||||
java/awt/Focus/8013611/JDK8013611.java 8175366 windows-all,macosx-all
|
||||
java/awt/Focus/6378278/InputVerifierTest.java 8198616 macosx-all
|
||||
java/awt/Focus/6382144/EndlessLoopTest.java 8198617 macosx-all
|
||||
|
||||
@ -23,12 +23,13 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 6358034 6568560 8198613
|
||||
* @bug 6358034 6568560 8198613 8198335
|
||||
* @key headful
|
||||
* @summary Tests that no exception is thrown when display mode is changed
|
||||
* externally
|
||||
* @compile UninitializedDisplayModeChangeTest.java DisplayModeChanger.java
|
||||
* @run main/othervm UninitializedDisplayModeChangeTest
|
||||
* @run main/othervm -Djava.awt.headless=true UninitializedDisplayModeChangeTest
|
||||
*/
|
||||
|
||||
import java.awt.EventQueue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user