/*
@test %I% %E%
@bug 6315717
@summary verifies that InputEvent.getMaskForButton() returns the same values as in InputEvent.BUTTON_DOWN_MASK
@author Andrei Dmitriev : area=awt.event
@run main CheckGetMaskForButton
*/
public class CheckGetMaskForButton{
CheckGetMaskForButton f = new CheckGetMaskForButton();
}
//get same array via reflection
new PrivilegedAction() {
try {
method.setAccessible(true);
}
}catch (Exception e){
throw new RuntimeException("Test failed. Exception occured:", e);
}
return null;
}
});
}
//check that length of API array greater or equals then Reflect array.
throw new RuntimeException("Test failed. The length of API array greater or equals then the length of Reflect array.");
}
//Check that the values obtained via reflection from InputEvent.BUTTON_DOWN_MASK are the
// same as for standard API.
throw new RuntimeException("Test failed. Values of InputEvent array are different for API and Reflection invocations");
}
}
}
}