Skip to content

Conversation

jonahgraham
Copy link
Contributor

As I prepare my final Clipboard PR for #2126 I split out this test simplification and refactor to ensure that the tests still work as expected before my Clipboard changes land.

Changes include:

  • Splitting out RemoteClipboard wrapper so that we can test other controls clipboard fully by remotely controlling the clipboard.
  • Moving some useful test methods (runOperationInThread and waitAllEvents) to SwtTestUtil
  • Improving SwtTestUtil.openShell on GTK4 so that all events needed to ensure shell is fully opened are received. In particular we used to just wait for SWT.Paint, however some operations, such as clipboard, cannot happen until SWT.Activate are also received.
  • Added SwtTestUtil.waitAllEvents to support SwtTestUtil.openShell change
  • Cleaned up Test_org_eclipse_swt_dnd_Clipboard now that I have better understanding how Clipboard works
  • Added tests for selection clipboard by parameterizing most tests and adding new tests that check interaction between selection and normal clipboard
  • Remove unneeded processEvents calls from Test_org_eclipse_swt_dnd_Clipboard

Part of #2126

As I prepare my final Clipboard PR for eclipse-platform#2126 I split out this test
simplification and refactor to ensure that the tests still work
as expected before my Clipboard changes land.

Changes include:

- Splitting out RemoteClipboard wrapper so that we can test other controls
clipboard fully by remotely controlling the clipboard.
- Moving some useful test methods (runOperationInThread and waitAllEvents)
to SwtTestUtil
- Improving SwtTestUtil.openShell on GTK4 so that all events needed to
ensure shell is fully opened are received. In particular we used to just
wait for SWT.Paint, however some operations, such as clipboard, cannot
happen until SWT.Activate are also received.
- Added SwtTestUtil.waitAllEvents to support SwtTestUtil.openShell change
- Cleaned up Test_org_eclipse_swt_dnd_Clipboard now that I have better
understanding how Clipboard works
- Added tests for selection clipboard by parameterizing most tests and
adding new tests that check interaction between selection and normal
clipboard
- Remove unneeded processEvents calls from Test_org_eclipse_swt_dnd_Clipboard

Part of eclipse-platform#2126
Copy link
Contributor

Test Results

  115 files  ±0    115 suites  ±0   9m 45s ⏱️ - 2m 43s
4 560 tests +6  4 544 ✅ +6  16 💤 ±0  0 ❌ ±0 
  311 runs  ±0    308 ✅ ±0   3 💤 ±0  0 ❌ ±0 

Results for commit 7ade0bb. ± Comparison against base commit d2de8e3.

This pull request removes 4 and adds 10 tests. Note that renamed tests count towards both.
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_LocalClipboard
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_Remote
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_getContents
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_setContents
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_LocalClipboard(int)[1]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_LocalClipboard(int)[2]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_Remote(int)[1]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_Remote(int)[2]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_getContents(int)[1]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_getContents(int)[2]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_getContentsBothClipboards
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_setContents(int)[1]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_setContents(int)[2]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_setContentsBothClipboards

@jonahgraham jonahgraham marked this pull request as ready for review October 17, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant