Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corporation and others.
* Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -56,10 +56,6 @@ public boolean isBot() {
return UrlUtil.isBot(request);
}

public boolean isGecko() {
return UrlUtil.isGecko(request);
}

public boolean isIE() {
return UrlUtil.isIE(request);
}
Expand All @@ -68,10 +64,6 @@ public String getIEVersion() {
return UrlUtil.getIEVersion(request);
}

public boolean isKonqueror() {
return UrlUtil.isKonqueror(request);
}

public boolean isMozilla() {
return UrlUtil.isMozilla(request);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corporation and others.
* Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -268,22 +268,6 @@ public static boolean isBot(HttpServletRequest request) {
|| request.getParameter("bot") != null;//$NON-NLS-1$
}

public static boolean isGecko(HttpServletRequest request) {
String agent = request.getHeader("User-Agent"); //$NON-NLS-1$
return isGecko(agent);
}

public static boolean isGecko(String agent) {
if (agent==null)
return false;
agent=agent.toLowerCase(Locale.ENGLISH);
// sample substring Gecko/20020508
if (agent.contains("like gecko")) { //$NON-NLS-1$
return false;
}
return agent.contains("gecko"); //$NON-NLS-1$
}

public static boolean isIE(HttpServletRequest request) {
String agent = request.getHeader("User-Agent"); //$NON-NLS-1$
return isIE(agent);
Expand Down Expand Up @@ -330,18 +314,6 @@ public static String getIEVersion(String agent) {
return agent.substring(start, end);
}

public static boolean isKonqueror(HttpServletRequest request) {
String agent = request.getHeader("User-Agent"); //$NON-NLS-1$
return isKonqueror(agent);
}

public static boolean isKonqueror(String agent) {
if (agent==null)
return false;
agent=agent.toLowerCase(Locale.ENGLISH);
return agent.contains("konqueror"); //$NON-NLS-1$
}

/**
* Test to see if this is a "mozilla" browser, i.e.
* just about anything other than Internet Explorer
Expand Down
2 changes: 1 addition & 1 deletion ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: User Assistance Test
Bundle-SymbolicName: org.eclipse.ua.tests;singleton:=true
Bundle-Version: 3.7.0.qualifier
Bundle-Version: 3.7.100.qualifier
Require-Bundle: org.eclipse.help.ui,
org.eclipse.help.webapp,
org.eclipse.test.performance,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2016 IBM Corporation and others.
* Copyright (c) 2006, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -33,9 +33,7 @@ public void testIE_6() {
assertTrue(UrlUtil.isIE(agent));
assertFalse(UrlUtil.isMozilla(agent));
assertFalse(UrlUtil.isOpera(agent));
assertFalse(UrlUtil.isKonqueror(agent));
assertFalse(UrlUtil.isSafari(agent));
assertFalse(UrlUtil.isGecko(agent));
assertEquals("6.0", UrlUtil.getIEVersion(agent));
}

Expand All @@ -45,9 +43,7 @@ public void testWindowsFirefox_1_8() {
assertFalse(UrlUtil.isIE(agent));
assertTrue(UrlUtil.isMozilla(agent));
assertFalse(UrlUtil.isOpera(agent));
assertFalse(UrlUtil.isKonqueror(agent));
assertFalse(UrlUtil.isSafari(agent));
assertTrue(UrlUtil.isGecko(agent));
assertEquals("1.8.0.8", UrlUtil.getMozillaVersion(agent));
}

Expand All @@ -57,9 +53,7 @@ public void testGTKFirefox_1_4() {
assertFalse(UrlUtil.isIE(agent));
assertTrue(UrlUtil.isMozilla(agent));
assertFalse(UrlUtil.isOpera(agent));
assertFalse(UrlUtil.isKonqueror(agent));
assertFalse(UrlUtil.isSafari(agent));
assertTrue(UrlUtil.isGecko(agent));
assertEquals("1.4", UrlUtil.getMozillaVersion(agent));
}

Expand All @@ -69,9 +63,7 @@ public void testGTKKonqueror_3_1() {
assertFalse(UrlUtil.isIE(agent));
assertTrue(UrlUtil.isMozilla(agent));
assertFalse(UrlUtil.isOpera(agent));
assertTrue(UrlUtil.isKonqueror(agent));
assertFalse(UrlUtil.isSafari(agent));
assertFalse(UrlUtil.isGecko(agent));
}

@Test
Expand All @@ -80,9 +72,7 @@ public void testMacMozilla1_7_3 () {
assertFalse(UrlUtil.isIE(agent));
assertTrue(UrlUtil.isMozilla(agent));
assertFalse(UrlUtil.isOpera(agent));
assertFalse(UrlUtil.isKonqueror(agent));
assertFalse(UrlUtil.isSafari(agent));
assertTrue(UrlUtil.isGecko(agent));
assertEquals("1.7.3", UrlUtil.getMozillaVersion(agent));
}

Expand All @@ -92,9 +82,7 @@ public void testSafari_417_8 () {
assertFalse(UrlUtil.isIE(agent));
assertTrue(UrlUtil.isMozilla(agent));
assertFalse(UrlUtil.isOpera(agent));
assertFalse(UrlUtil.isKonqueror(agent));
assertTrue(UrlUtil.isSafari(agent));
assertFalse(UrlUtil.isGecko(agent));
assertEquals("417", UrlUtil.getSafariVersion(agent));
}

Expand All @@ -104,9 +92,7 @@ public void testOpera_9() {
assertFalse(UrlUtil.isIE(agent));
assertFalse(UrlUtil.isMozilla(agent));
assertTrue(UrlUtil.isOpera(agent));
assertFalse(UrlUtil.isKonqueror(agent));
assertFalse(UrlUtil.isSafari(agent));
assertFalse(UrlUtil.isGecko(agent));
assertEquals("9.02", UrlUtil.getOperaVersion(agent));
}

Expand All @@ -116,9 +102,7 @@ public void testOpera_9_IEMode () {
assertTrue(UrlUtil.isIE(agent));
assertFalse(UrlUtil.isMozilla(agent));
assertTrue(UrlUtil.isOpera(agent));
assertFalse(UrlUtil.isKonqueror(agent));
assertFalse(UrlUtil.isSafari(agent));
assertFalse(UrlUtil.isGecko(agent));
assertEquals("6.0", UrlUtil.getIEVersion(agent));
}

Expand All @@ -128,9 +112,7 @@ public void testXulRunnerOnUbuntu() {
assertFalse(UrlUtil.isIE(agent));
assertTrue(UrlUtil.isMozilla(agent));
assertFalse(UrlUtil.isOpera(agent));
assertFalse(UrlUtil.isKonqueror(agent));
assertFalse(UrlUtil.isSafari(agent));
assertTrue(UrlUtil.isGecko(agent));
assertEquals("1.9", UrlUtil.getMozillaVersion(agent));
}

Expand All @@ -140,9 +122,7 @@ public void testXulRunnerTruncated() {
assertFalse(UrlUtil.isIE(agent));
assertTrue(UrlUtil.isMozilla(agent));
assertFalse(UrlUtil.isOpera(agent));
assertFalse(UrlUtil.isKonqueror(agent));
assertFalse(UrlUtil.isSafari(agent));
assertFalse(UrlUtil.isGecko(agent));
}

@Test
Expand All @@ -151,12 +131,7 @@ public void testFirefox3() {
assertFalse(UrlUtil.isIE(agent));
assertTrue(UrlUtil.isMozilla(agent));
assertFalse(UrlUtil.isOpera(agent));
assertFalse(UrlUtil.isKonqueror(agent));
assertFalse(UrlUtil.isSafari(agent));
assertTrue(UrlUtil.isGecko(agent));
assertEquals("1.8.1.13", UrlUtil.getMozillaVersion(agent));
}



}
2 changes: 1 addition & 1 deletion ua/org.eclipse.ua.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</parent>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.ua.tests</artifactId>
<version>3.7.0-SNAPSHOT</version>
<version>3.7.100-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>

<properties>
Expand Down
Loading