870N/A/*
870N/A @test %I% %E%
870N/A @bug 6315717
870N/A @summary verifies that system property sun.awt.enableExtraMouseButtons might be set to true by the command line
870N/A @author Andrei Dmitriev : area=awt.mouse
870N/A @run main/othervm -Dsun.awt.enableExtraMouseButtons=true SystemPropTest_2
870N/A */
870N/A//1) Verifies that System.getProperty("sun.awt.enableExtraMouseButtons") returns true if set through the command line.
870N/A//2) Verifies that Toolkit.areExtraMouseButtonsEnabled() returns true if the proprty is set through the command line.
870N/Aimport java.awt.*;
870N/A
870N/Apublic class SystemPropTest_2 {
870N/A
870N/A public static void main(String []s){
870N/A boolean propValue = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons"));
870N/A System.out.println("System.getProperty = " + propValue);
870N/A if (!propValue){
870N/A throw new RuntimeException("TEST FAILED : System property sun.awt.enableExtraMouseButtons = " + propValue);
870N/A }
870N/A if (!Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled()){
870N/A throw new RuntimeException("TEST FAILED : Toolkit.areExtraMouseButtonsEnabled() returns false");
870N/A }
870N/A System.out.println("Test passed.");
870N/A }
870N/A}