Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.codename1.ui.BrowserComponent;
import com.codename1.ui.Form;
import com.codename1.ui.Sheet;
import com.codename1.ui.layouts.BorderLayout;
import com.codename1.ui.util.UITimer;
import com.codename1.util.SuccessCallback;
Expand All @@ -13,6 +14,7 @@ public class BrowserComponentScreenshotTest extends BaseTest {
private Form form;
private boolean jsReady;
private boolean jsCheckPending;
private boolean sheetShown;

@Override
public boolean runTest() throws Exception {
Expand Down Expand Up @@ -56,8 +58,16 @@ public void onSucess(BrowserComponent.JSRef result) {
return;
}

UITimer.timer(2000, false, form, readyRunnable);
Runnable run = readyRunnable;
readyRunnable = null;
UITimer.timer(300, false, form, () -> {
if (!sheetShown) {
sheetShown = true;
Sheet sheet = new Sheet(null, "Browser Sheet");
sheet.show(0);
}
UITimer.timer(700, false, form, run);
});
}

private static String buildHtml() {
Expand Down
Loading