aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/widgetset/client/AssertionFailureWidget.java
blob: 91e50fdf068187c75d75f3c838540d3033cf2014 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package com.vaadin.tests.widgetset.client;

import com.google.gwt.core.client.Scheduler;
import com.google.gwt.user.client.ui.SimplePanel;
import com.vaadin.client.ui.VLabel;

public class AssertionFailureWidget extends SimplePanel {

    public AssertionFailureWidget() {
        Scheduler.get().scheduleDeferred(() -> {
            assert 1 == 2 : "This should fail.";
            VLabel w = new VLabel();
            add(w);
            w.setText("This should not be here.");
            w.addStyleName("non-existent-widget");
        });
    }
}