Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.swt.tests')
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java
index 5b39957135..cabad4f999 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java
@@ -705,6 +705,27 @@ public void test_ProgressListener_addAndRemove() {
for (int i = 0; i < 100; i++) browser.removeProgressListener(listener);
}
+@Test
+public void test_ProgressListener_completed_Called() {
+ AtomicBoolean childCompleted = new AtomicBoolean(false);
+ ProgressListener l = new ProgressListener() {
+
+ @Override
+ public void completed(ProgressEvent event) {
+ childCompleted.set(true);
+ }
+
+ @Override
+ public void changed(ProgressEvent event) {
+
+ }
+ };
+ browser.addProgressListener(l);
+ browser.setText("<html><body>This test ensures that the completed listener is called.</body></html>");
+ boolean passed = waitForPassCondition(childCompleted::get);
+ assertTrue(passed);
+}
+
@Test(expected = IllegalArgumentException.class)
public void test_StatusTextListener_addWithNull() {
browser.addStatusTextListener(null);

Back to the top