You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

WindowWithInvalidCloseListener.java 800B

12345678910111213141516171819202122232425262728
  1. package com.vaadin.tests.components.window;
  2. import com.vaadin.server.VaadinRequest;
  3. import com.vaadin.tests.components.AbstractReindeerTestUI;
  4. import com.vaadin.ui.Window;
  5. public class WindowWithInvalidCloseListener extends AbstractReindeerTestUI {
  6. @Override
  7. protected void setup(VaadinRequest request) {
  8. Window w = new Window("Close me");
  9. w.addCloseListener(event -> {
  10. throw new RuntimeException("Close listener intentionally failed");
  11. });
  12. addWindow(w);
  13. }
  14. @Override
  15. protected String getTestDescription() {
  16. return "The window has a close listener which throws an exception. This should not prevent the window from being closed.";
  17. }
  18. @Override
  19. protected Integer getTicketNumber() {
  20. return 10779;
  21. }
  22. }