Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLeo Ufimtsev2017-08-21 15:30:46 -0400
committerLeo Ufimtsev2017-08-21 15:30:46 -0400
commit1c87b744636da422526f92fb4597383cdb1f2aad (patch)
tree233601eead12dffaf8c2abdc0ac0b56b8c8728ba /tests
parentd3cf8139193a1ac625dde3ffee456c07df9c7bf6 (diff)
downloadeclipse.platform.swt-1c87b744636da422526f92fb4597383cdb1f2aad.tar.gz
eclipse.platform.swt-1c87b744636da422526f92fb4597383cdb1f2aad.tar.xz
eclipse.platform.swt-1c87b744636da422526f92fb4597383cdb1f2aad.zip
Bug 517264 – Refactor Test_*_Browser (setText issues on win)
On Windows, setTitle() sometimes seems to trigger multiple title changes, once to "about:blank" and then to the actual desired page. This patch skips over "about:blank" changes. Change-Id: I8b30988e32e23162cf81ea45ea267e1aa39445c7 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.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.java3
1 files changed, 2 insertions, 1 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 74291be03a..5bff1a32b0 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
@@ -779,7 +779,8 @@ private void validateTitleChanged(String expectedTitle, Runnable browserSetFunc)
browserSetFunc.run();
shell.open();
- boolean hasFinished = waitForPassCondition(() -> actualTitle.get().length() != 0);
+ boolean hasFinished = waitForPassCondition(() -> actualTitle.get().length() != 0
+ && !actualTitle.get().contains("about:blank")); // Windows sometimes does 2 loads, one "about:blank", and one actual load.
boolean passed = hasFinished && actualTitle.get().equals(expectedTitle);
String errMsg = "";
if (!hasFinished)

Back to the top