Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoland Grunberg2018-01-05 10:37:49 -0500
committerLeo Ufimtsev2018-01-05 17:48:05 -0500
commit544c7da3964eddf881bd22c0d6ccc2c10c787670 (patch)
treeb58072bb532ed1c047f6cf1ade5de6d80e847338 /tests
parentac74a09868e8b5887cede3661179712181968312 (diff)
downloadeclipse.platform.swt-544c7da3964eddf881bd22c0d6ccc2c10c787670.tar.gz
eclipse.platform.swt-544c7da3964eddf881bd22c0d6ccc2c10c787670.tar.xz
eclipse.platform.swt-544c7da3964eddf881bd22c0d6ccc2c10c787670.zip
Bug 529442: [Webkit2] Add more restrictions on clearAllSessionCookies.
The clear all sessions functionality for Webkit2 is only available since version 2.16, so skip the test if this is not satisfied. Change-Id: I0ee752be9f5cc65191b31b1f4f101dea6c2e5570 Signed-off-by: Roland Grunberg <rgrunber@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.java8
1 files changed, 7 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 5aa58f2aa7..80ba7887fd 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
@@ -87,6 +87,8 @@ public class Test_org_eclipse_swt_browser_Browser extends Test_org_eclipse_swt_w
boolean isWebkit1 = false;
boolean isWebkit2 = false;
+ static int[] webkitGtkVersionInts = new int[3];
+
/** Accumiliate logs, print only if test case fails. Cleared for each test case. */
StringBuffer testLog;
private void testLogAppend(String msg) {
@@ -117,7 +119,6 @@ public void setUp() {
shellTitle = shellTitle + " Webkit version: " + webkitGtkVersionStr;
String[] webkitGtkVersionStrParts = webkitGtkVersionStr.split("\\.");
- int[] webkitGtkVersionInts = new int[3];
for (int i = 0; i < 3; i++) {
webkitGtkVersionInts[i] = Integer.parseInt(webkitGtkVersionStrParts[i]);
}
@@ -173,6 +174,11 @@ public void test_evalute_Cookies () {
@Test
public void test_ClearAllSessionCookies () {
+ if (isWebkit2) {
+ // clearSessions will only work for Webkit2 when >= 2.16
+ assumeTrue(webkitGtkVersionInts[1] >= 16);
+ }
+
final AtomicBoolean loaded = new AtomicBoolean(false);
browser.addProgressListener(ProgressListener.completedAdapter(event -> loaded.set(true)));

Back to the top