* Test the accessors in {@link NativePreviewEvent}.
*/
public void testNativePreviewEventAccessors() {
// cancelNativeEvent
{
NativePreviewEvent event = new NativePreviewEvent();
assertFalse(event.isCanceled());
event.cancel();
assertTrue(event.isCanceled());
}
// preventCancelNativeEvent
{
NativePreviewEvent event = new NativePreviewEvent();
assertFalse(event.isConsumed());
event.consume();
assertTrue(event.isConsumed());
}
// revive
{
NativePreviewEvent event = new NativePreviewEvent();
event.cancel();
event.consume();
assertTrue(event.isCanceled());
assertTrue(event.isConsumed());
event.revive();
assertFalse(event.isCanceled());
assertFalse(event.isConsumed());
}
}