Skip to content

Field "ignoreNonDisposedShells" in Test_org_eclipse_swt_browser_Browser hides a faulty check #1668

@fedejeanne

Description

@fedejeanne

Describe the bug
The field ignoreNonDisposedShells in the test class Test_org_eclipse_swt_browser_Browser hides a faulty check done inside the method afterDispose(Display). That check takes notice of shells that haven't been disposed yet but it does it too soon namely: after each test. The problem is that after each test, the top-most shell and also the "limbo" shell are still open and they will remain open until the workbench is shut down.

Additionally, the check not only detects these shells too soon but it also disposes of them as a patch to avoid that the same check fails in the next test.

To Reproduce

  • Remove the line that sets ignoreNonDisposedShells = true in Test_org_eclipse_swt_browser_Browser: the first test will fail because of shells being left open
  • Additionally, remove the line that disposes the shell in afterDispose(Display): all tests will fail

Expected behavior
It shouldn't be necessary to dispose the shells manually.

Environment:
I've seen it in Windows but I can imagine this is reproducible in all OSes

    • All OS
    • Windows
    • Linux
    • macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions