Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Vogel2018-04-23 18:24:18 +0000
committerLars Vogel2018-04-23 18:24:23 +0000
commit7e26298a37530386730c4f19b1bd48816e757e88 (patch)
tree0824fb1445bb07dfe0d687adcee4fe85a000eec3 /tests
parentc5d6504db58eba478f87ed95f0d56ca3b300f2e1 (diff)
downloadeclipse.platform.swt-7e26298a37530386730c4f19b1bd48816e757e88.tar.gz
eclipse.platform.swt-7e26298a37530386730c4f19b1bd48816e757e88.tar.xz
eclipse.platform.swt-7e26298a37530386730c4f19b1bd48816e757e88.zip
Bug 533677 - [win32] calling Browser#refresh does not call
ProgressListener#completed Adds test to ensure a completed listener is called Change-Id: Ice4e6cbfa7ce2cc57a58739430581df56bd0ccb2 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to '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