< prev index next >

test/java/awt/Debug/DumpOnKey/DumpOnKey.java

Print this page
rev 14836 : 8159690: [TESTBUG] Mark headful tests with @key headful.


  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.awt.AWTException;
  25 import java.awt.Frame;
  26 import java.awt.Robot;
  27 import java.awt.Window;
  28 import java.awt.event.InputEvent;
  29 import java.awt.event.KeyEvent;
  30 import java.io.PrintStream;
  31 
  32 /**
  33  * @test

  34  * @bug 4379403
  35  * @run main/othervm DumpOnKey false
  36  * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=true true
  37  * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=true -Dawtdebug.on=true true
  38  * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=false -Dawtdebug.on=true false
  39  * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=true -Dawtdebug.on=false false
  40  * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=false -Dawtdebug.on=false false
  41  * @run main/othervm/java.security.policy=dump.policy/secure=java.lang.SecurityManager DumpOnKey -Dsun.awt.nativedebug=true true
  42  * @run main/othervm/java.security.policy=dump.policy/secure=java.lang.SecurityManager DumpOnKey -Dsun.awt.nativedebug=true -Dawtdebug.on=false false
  43  */
  44 public final class DumpOnKey {
  45 
  46     private static volatile boolean dumped;
  47 
  48     public static void main(final String[] args) throws AWTException {
  49         final boolean dump = Boolean.parseBoolean(args[0]);
  50         final Window w = new Frame() {
  51             @Override
  52             public void list(final PrintStream out, final int indent) {
  53                 super.list(out, indent);




  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.awt.AWTException;
  25 import java.awt.Frame;
  26 import java.awt.Robot;
  27 import java.awt.Window;
  28 import java.awt.event.InputEvent;
  29 import java.awt.event.KeyEvent;
  30 import java.io.PrintStream;
  31 
  32 /**
  33  * @test
  34  * @key headful
  35  * @bug 4379403
  36  * @run main/othervm DumpOnKey false
  37  * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=true true
  38  * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=true -Dawtdebug.on=true true
  39  * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=false -Dawtdebug.on=true false
  40  * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=true -Dawtdebug.on=false false
  41  * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=false -Dawtdebug.on=false false
  42  * @run main/othervm/java.security.policy=dump.policy/secure=java.lang.SecurityManager DumpOnKey -Dsun.awt.nativedebug=true true
  43  * @run main/othervm/java.security.policy=dump.policy/secure=java.lang.SecurityManager DumpOnKey -Dsun.awt.nativedebug=true -Dawtdebug.on=false false
  44  */
  45 public final class DumpOnKey {
  46 
  47     private static volatile boolean dumped;
  48 
  49     public static void main(final String[] args) throws AWTException {
  50         final boolean dump = Boolean.parseBoolean(args[0]);
  51         final Window w = new Frame() {
  52             @Override
  53             public void list(final PrintStream out, final int indent) {
  54                 super.list(out, indent);


< prev index next >