Skip to content

Commit 4b06eec

Browse files
committed
Fail animation demo screenshots when native capture is unavailable
1 parent f557d0d commit 4b06eec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/demos/common/src/test/java/com/codenameone/developerguide/animations/AnimationDemosScreenshotTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ private Image capture(Form form) {
108108

109109
Image screenshot = holder[0];
110110
if (screenshot == null) {
111-
screenshot = Image.createImage(form.getWidth(), form.getHeight());
111+
fail("Timed out waiting for native screenshot result.");
112+
throw new IllegalStateException("Timed out waiting for native screenshot result.");
112113
}
113114

114115
if (screenshot.getGraphics() != null && display.shouldPaintNativeScreenshot(screenshot)) {

0 commit comments

Comments
 (0)