Author: adietish
Date: 2010-09-29 07:29:35 -0400 (Wed, 29 Sep 2010)
New Revision: 25296
Modified:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java
Log:
[JBIDE-7208] simplified linux user agent string tests added
Modified:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java
===================================================================
---
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java 2010-09-29
10:33:10 UTC (rev 25295)
+++
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java 2010-09-29
11:29:35 UTC (rev 25296)
@@ -935,7 +935,36 @@
/**
* FAILED
*/
- // @Test
+ // @Test // @Test
+ // public void testUrl_debug_utma() throws IOException {
+ // TestHttpGetMethod method = new TestHttpGetMethod();
+ // String url = "http://www.google-analytics.com/__utm.gif?"
+ // + "utmwv=4.7.2"
+ // + "&utmn=15176694"
+ // + "&utmhn=jboss.org"
+ // + "&utmcs=UTF-8"
+ // + "&utmsr=1920x1080"
+ // + "&utmsc=24-bit"
+ // + "&utmul=th-TH"
+ // + "&utmdt=tools-usage-testUrl_utmaCookies_utmb_utmc_1"
+ // + "&utmhid=1087431432"
+ // + "&utmp=%2Ftools%2Fusage%2FtestUrl_utmaCookies_utmb_utmc_1"
+ // + "&utmac=UA-17645367-1"
+ // + "&utmcc="
+ // +
+ //
"__utma%3D999.5737734690471263281282924103927.1282924103925.1282924103925.1282924103925.1%3B%2B"
+ // + "__utmb%3D1%3B%2B"
+ // + "__utmc%3D1%3B%2B"
+ // + "__utmz%3D156030500.1281430767.1.1."
+ // + "utmcsr%3D(direct)%7C"
+ // + "utmccn%3D(direct)%7C"
+ // + "utmcmd%3D(none)%7C"
+ // +
+ //
"utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+ // + "&gaq=1";
+ // method.request(url);
+ // assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ // }
// public void testJBossToolsVersionInRefererrer() throws IOException {
// TestHttpGetMethod method = new TestHttpGetMethod();
// String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
@@ -960,27 +989,29 @@
/**
* FAILURE
*/
-// @Test
-// public void testJBossToolsVersionInAdContent() throws IOException {
-// TestHttpGetMethod method = new TestHttpGetMethod();
-// String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
-// + "&utmn=818594305"
-// + "&utmhn=jboss.org"
-// + "&utmcs=UTF-8"
-// + "&utmsr=1920x1080"
-// + "&utmsc=24-bit"
-// + "&utmul=th-TH"
-// + "&utmdt=testJBossToolsVersionInAdContent"
-// + "&utmfl=1.6.0_20"
-// + "&utmr=0"
-// + "&utm_content=1.0.0.qualifier"
-// + "&utmp=" + new
JBossToolsTestsFocusPoint("testJBossToolsVersionInAdContent").getURI()
-// + "&utmac=UA-17645367-1"
-// +
"&utmcc=__utma%3D999.43297294488397354581284108794036.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
-// + "&gaq=1";
-// method.request(url);
-// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
-// }
+ // @Test
+ // public void testJBossToolsVersionInAdContent() throws IOException {
+ // TestHttpGetMethod method = new TestHttpGetMethod();
+ // String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
+ // + "&utmn=818594305"
+ // + "&utmhn=jboss.org"
+ // + "&utmcs=UTF-8"
+ // + "&utmsr=1920x1080"
+ // + "&utmsc=24-bit"
+ // + "&utmul=th-TH"
+ // + "&utmdt=testJBossToolsVersionInAdContent"
+ // + "&utmfl=1.6.0_20"
+ // + "&utmr=0"
+ // + "&utm_content=1.0.0.qualifier"
+ // + "&utmp=" + new
+ // JBossToolsTestsFocusPoint("testJBossToolsVersionInAdContent").getURI()
+ // + "&utmac=UA-17645367-1"
+ // +
+ //
"&utmcc=__utma%3D999.43297294488397354581284108794036.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
+ // + "&gaq=1";
+ // method.request(url);
+ // assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ // }
enum UserAgentString {
@@ -1006,150 +1037,166 @@
/**
* SUCCESS
*/
-// @Test
-// public void testWinWin7UserAgent() throws IOException {
-// TestHttpGetMethod method = new TestHttpGetMethod(UserAgentString.WIN7);
-// String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
-// + "&utmn=9115966544326"
-// + "&utmhn=jboss.org"
-// + "&utmcs=UTF-8"
-// + "&utmsr=1920x1080"
-// + "&utmsc=24-bit"
-// + "&utmul=th-TH"
-// + "&utmdt=testWinWin7UserAgent"
-// + "&utmfl=1.6.0_20"
-// + "&utmr=1.0.0.qualifier"
-// + "&utmp=" + new
JBossToolsTestsFocusPoint("testWinWin7UserAgent").getURI()
-// + "&utmac=UA-17645367-1"
-// +
"&utmcc=__utma%3D999.43297885388356354581284108794036.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
-// + "&gaq=1";
-// method.request(url);
-// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
-// }
+ // @Test
+ // public void testWinWin7UserAgent() throws IOException {
+ // TestHttpGetMethod method = new TestHttpGetMethod(UserAgentString.WIN7);
+ // String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
+ // + "&utmn=9115966544326"
+ // + "&utmhn=jboss.org"
+ // + "&utmcs=UTF-8"
+ // + "&utmsr=1920x1080"
+ // + "&utmsc=24-bit"
+ // + "&utmul=th-TH"
+ // + "&utmdt=testWinWin7UserAgent"
+ // + "&utmfl=1.6.0_20"
+ // + "&utmr=1.0.0.qualifier"
+ // + "&utmp=" + new
+ // JBossToolsTestsFocusPoint("testWinWin7UserAgent").getURI()
+ // + "&utmac=UA-17645367-1"
+ // +
+ //
"&utmcc=__utma%3D999.43297885388356354581284108794036.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
+ // + "&gaq=1";
+ // method.request(url);
+ // assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ // }
/**
* SUCCESS
*/
-// @Test
-// public void testWinVistaUserAgent() throws IOException {
-// TestHttpGetMethod method = new TestHttpGetMethod(UserAgentString.WINVISTA);
-// String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
-// + "&utmn=9586654334566"
-// + "&utmhn=jboss.org"
-// + "&utmcs=UTF-8"
-// + "&utmsr=1920x1080"
-// + "&utmsc=24-bit"
-// + "&utmul=th-TH"
-// + "&utmdt=testWinVistaUserAgent"
-// + "&utmfl=1.6.0_20"
-// + "&utmr=1.0.0.qualifier"
-// + "&utmp=" + new
JBossToolsTestsFocusPoint("testWinVistaUserAgent").getURI()
-// + "&utmac=UA-17645367-1"
-// +
"&utmcc=__utma%3D999.432978853883973545812841087555446.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
-// + "&gaq=1";
-// method.request(url);
-// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
-// }
+ // @Test
+ // public void testWinVistaUserAgent() throws IOException {
+ // TestHttpGetMethod method = new
+ // TestHttpGetMethod(UserAgentString.WINVISTA);
+ // String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
+ // + "&utmn=9586654334566"
+ // + "&utmhn=jboss.org"
+ // + "&utmcs=UTF-8"
+ // + "&utmsr=1920x1080"
+ // + "&utmsc=24-bit"
+ // + "&utmul=th-TH"
+ // + "&utmdt=testWinVistaUserAgent"
+ // + "&utmfl=1.6.0_20"
+ // + "&utmr=1.0.0.qualifier"
+ // + "&utmp=" + new
+ // JBossToolsTestsFocusPoint("testWinVistaUserAgent").getURI()
+ // + "&utmac=UA-17645367-1"
+ // +
+ //
"&utmcc=__utma%3D999.432978853883973545812841087555446.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
+ // + "&gaq=1";
+ // method.request(url);
+ // assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ // }
/**
* SUCCESS
*/
-// @Test
-// public void testWinXPUserAgent() throws IOException {
-// TestHttpGetMethod method = new TestHttpGetMethod(UserAgentString.WINXP);
-// String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
-// + "&utmn=958593335"
-// + "&utmhn=jboss.org"
-// + "&utmcs=UTF-8"
-// + "&utmsr=1920x1080"
-// + "&utmsc=24-bit"
-// + "&utmul=th-TH"
-// + "&utmdt=testWinXPUserAgent"
-// + "&utmfl=1.6.0_20"
-// + "&utmr=1.0.0.qualifier"
-// + "&utmp=" + new
JBossToolsTestsFocusPoint("testWinXPUserAgent").getURI()
-// + "&utmac=UA-17645367-1"
-// +
"&utmcc=__utma%3D999.43297245388397354581284544794036.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
-// + "&gaq=1";
-// method.request(url);
-// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
-// }
+ // @Test
+ // public void testWinXPUserAgent() throws IOException {
+ // TestHttpGetMethod method = new TestHttpGetMethod(UserAgentString.WINXP);
+ // String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
+ // + "&utmn=958593335"
+ // + "&utmhn=jboss.org"
+ // + "&utmcs=UTF-8"
+ // + "&utmsr=1920x1080"
+ // + "&utmsc=24-bit"
+ // + "&utmul=th-TH"
+ // + "&utmdt=testWinXPUserAgent"
+ // + "&utmfl=1.6.0_20"
+ // + "&utmr=1.0.0.qualifier"
+ // + "&utmp=" + new
JBossToolsTestsFocusPoint("testWinXPUserAgent").getURI()
+ // + "&utmac=UA-17645367-1"
+ // +
+ //
"&utmcc=__utma%3D999.43297245388397354581284544794036.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
+ // + "&gaq=1";
+ // method.request(url);
+ // assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ // }
/**
* SUCCESS
*/
-// @Test
-// public void testWin2000UserAgent() throws IOException {
-// TestHttpGetMethod method = new TestHttpGetMethod(UserAgentString.WIN2000);
-// String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
-// + "&utmn=9588949905"
-// + "&utmhn=jboss.org"
-// + "&utmcs=UTF-8"
-// + "&utmsr=1920x1080"
-// + "&utmsc=24-bit"
-// + "&utmul=th-TH"
-// + "&utmdt=testWin2000UserAgent"
-// + "&utmfl=1.6.0_20"
-// + "&utmr=1.0.0.qualifier"
-// + "&utmp=" + new
JBossToolsTestsFocusPoint("testWin2000UserAgent").getURI()
-// + "&utmac=UA-17645367-1"
-// +
"&utmcc=__utma%3D999.43297292388397354581284009098776666.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
-// + "&gaq=1";
-// method.request(url);
-// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
-// }
+ // @Test
+ // public void testWin2000UserAgent() throws IOException {
+ // TestHttpGetMethod method = new
+ // TestHttpGetMethod(UserAgentString.WIN2000);
+ // String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
+ // + "&utmn=9588949905"
+ // + "&utmhn=jboss.org"
+ // + "&utmcs=UTF-8"
+ // + "&utmsr=1920x1080"
+ // + "&utmsc=24-bit"
+ // + "&utmul=th-TH"
+ // + "&utmdt=testWin2000UserAgent"
+ // + "&utmfl=1.6.0_20"
+ // + "&utmr=1.0.0.qualifier"
+ // + "&utmp=" + new
+ // JBossToolsTestsFocusPoint("testWin2000UserAgent").getURI()
+ // + "&utmac=UA-17645367-1"
+ // +
+ //
"&utmcc=__utma%3D999.43297292388397354581284009098776666.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
+ // + "&gaq=1";
+ // method.request(url);
+ // assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ // }
/**
* SUCCESS
*/
-// @Test
-// public void testMacLeopardUserAgent() throws IOException {
-// TestHttpGetMethod method = new TestHttpGetMethod(UserAgentString.MACOS_LEO);
-// String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
-// + "&utmn=958890665"
-// + "&utmhn=jboss.org"
-// + "&utmcs=UTF-8"
-// + "&utmsr=1920x1080"
-// + "&utmsc=24-bit"
-// + "&utmul=th-TH"
-// + "&utmdt=testMacLeopardUserAgent"
-// + "&utmfl=1.6.0_20"
-// + "&utmr=1.0.0.qualifier"
-// + "&utmp=" + new
JBossToolsTestsFocusPoint("testMacLeopardUserAgent").getURI()
-// + "&utmac=UA-17645367-1"
-// +
"&utmcc=__utma%3D999.432972923883973335812841778899886.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
-// + "&gaq=1";
-// method.request(url);
-// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
-// }
+ // @Test
+ // public void testMacLeopardUserAgent() throws IOException {
+ // TestHttpGetMethod method = new
+ // TestHttpGetMethod(UserAgentString.MACOS_LEO);
+ // String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
+ // + "&utmn=958890665"
+ // + "&utmhn=jboss.org"
+ // + "&utmcs=UTF-8"
+ // + "&utmsr=1920x1080"
+ // + "&utmsc=24-bit"
+ // + "&utmul=th-TH"
+ // + "&utmdt=testMacLeopardUserAgent"
+ // + "&utmfl=1.6.0_20"
+ // + "&utmr=1.0.0.qualifier"
+ // + "&utmp=" + new
+ // JBossToolsTestsFocusPoint("testMacLeopardUserAgent").getURI()
+ // + "&utmac=UA-17645367-1"
+ // +
+ //
"&utmcc=__utma%3D999.432972923883973335812841778899886.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
+ // + "&gaq=1";
+ // method.request(url);
+ // assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ // }
/**
* SUCCESS
*/
-// @Test
-// public void testMacSnowLeopardUserAgent() throws IOException {
-// TestHttpGetMethod method = new TestHttpGetMethod(UserAgentString.MACOS_SNOWLEO);
-// String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
-// + "&utmn=958890444"
-// + "&utmhn=jboss.org"
-// + "&utmcs=UTF-8"
-// + "&utmsr=1920x1080"
-// + "&utmsc=24-bit"
-// + "&utmul=th-TH"
-// + "&utmdt=testMacSnowLeopardUserAgent"
-// + "&utmfl=1.6.0_20"
-// + "&utmr=1.0.0.qualifier"
-// + "&utmp=" + new
JBossToolsTestsFocusPoint("testMacSnowLeopardUserAgent").getURI()
-// + "&utmac=UA-17645367-1"
-// +
"&utmcc=__utma%3D999.432972923883973335812221087554396.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
-// + "&gaq=1";
-// method.request(url);
-// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
-// }
+ // @Test
+ // public void testMacSnowLeopardUserAgent() throws IOException {
+ // TestHttpGetMethod method = new
+ // TestHttpGetMethod(UserAgentString.MACOS_SNOWLEO);
+ // String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
+ // + "&utmn=958890444"
+ // + "&utmhn=jboss.org"
+ // + "&utmcs=UTF-8"
+ // + "&utmsr=1920x1080"
+ // + "&utmsc=24-bit"
+ // + "&utmul=th-TH"
+ // + "&utmdt=testMacSnowLeopardUserAgent"
+ // + "&utmfl=1.6.0_20"
+ // + "&utmr=1.0.0.qualifier"
+ // + "&utmp=" + new
+ // JBossToolsTestsFocusPoint("testMacSnowLeopardUserAgent").getURI()
+ // + "&utmac=UA-17645367-1"
+ // +
+ //
"&utmcc=__utma%3D999.432972923883973335812221087554396.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
+ // + "&gaq=1";
+ // method.request(url);
+ // assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ // }
@Test
public void testLinuxFedoraUserAgent() throws IOException {
- TestHttpGetMethod method = new TestHttpGetMethod("Mozilla/5.0 (X11; U; Linux i686;
th-TH; rv:1.8.1.14) Gecko/20080612 Fedora/2.0.0.14-20080612.fc8.acer
Firefox/2.0.0.14");
+ TestHttpGetMethod method = new TestHttpGetMethod(
+ "Mozilla/5.0 (X11; U; Linux i686; th-TH; rv:1.8.1.14) Gecko/20080612
Fedora/2.0.0.14-20080612.fc8.acer Firefox/2.0.0.14");
String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
+ "&utmn=95830066444"
+ "&utmhn=jboss.org"
@@ -1160,7 +1207,8 @@
+ "&utmdt=testLinuxFedoraUserAgent"
+ "&utmfl=1.6.0_20"
+ "&utmr=1.0.0.qualifier"
- + "&utmp=" + new
JBossToolsTestsFocusPoint("testLinuxFedoraUserAgent").getURI()
+ + "&utmp="
+ + new JBossToolsTestsFocusPoint("testLinuxFedoraUserAgent").getURI()
+ "&utmac=UA-17645367-1"
+
"&utmcc=__utma%3D999.43297292388397333777722108766778.1284108997725.1284198794990.1284108794995.1%3B%2B__utmz%3D999.1284108794025.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
+ "&gaq=1";
@@ -1170,7 +1218,8 @@
@Test
public void testLinuxUbuntuUserAgent() throws IOException {
- TestHttpGetMethod method = new TestHttpGetMethod("Mozilla/5.0 (X11; U; Linux i686;
pl-PL; rv:1.9.0.2) Gecko/20121223 Ubuntu/9.25 (jaunty) Firefox/3.8");
+ TestHttpGetMethod method = new TestHttpGetMethod(
+ "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.2) Gecko/20121223 Ubuntu/9.25
(jaunty) Firefox/3.8");
String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
+ "&utmn=958990044"
+ "&utmhn=jboss.org"
@@ -1181,17 +1230,19 @@
+ "&utmdt=testLinuxUbuntuUserAgent"
+ "&utmfl=1.6.0_20"
+ "&utmr=1.0.0.qualifier"
- + "&utmp=" + new
JBossToolsTestsFocusPoint("testLinuxUbuntuUserAgent").getURI()
+ + "&utmp="
+ + new JBossToolsTestsFocusPoint("testLinuxUbuntuUserAgent").getURI()
+ "&utmac=UA-17645367-1"
+
"&utmcc=__utma%3D999.46667292388397333777722108794036.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794225.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
+ "&gaq=1";
method.request(url);
assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
+ }
+
@Test
public void testLinuxSUSEUserAgent() throws IOException {
- TestHttpGetMethod method = new TestHttpGetMethod("Mozilla/5.0 (X11; U; Linux
x86_64; th-TH; rv:1.9.2.8) Gecko/20100723 SUSE/3.6.8-0.1.1 Firefox/3.6.8");
+ TestHttpGetMethod method = new TestHttpGetMethod(
+ "Mozilla/5.0 (X11; U; Linux x86_64; th-TH; rv:1.9.2.8) Gecko/20100723
SUSE/3.6.8-0.1.1 Firefox/3.6.8");
String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
+ "&utmn=957000994"
+ "&utmhn=jboss.org"
@@ -1202,17 +1253,19 @@
+ "&utmdt=testLinuxSUSEUserAgent"
+ "&utmfl=1.6.0_20"
+ "&utmr=1.0.0.qualifier"
- + "&utmp=" + new
JBossToolsTestsFocusPoint("testLinuxSUSEUserAgent").getURI()
+ + "&utmp="
+ + new JBossToolsTestsFocusPoint("testLinuxSUSEUserAgent").getURI()
+ "&utmac=UA-17645367-1"
+
"&utmcc=__utma%3D999.46667292388397333777722108798936.1284108794025.1284108794025.1284108794025.1%3B%2B__utmz%3D999.1284108794225.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
+ "&gaq=1";
method.request(url);
assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
+ }
@Test
public void testLinuxSlackwareUserAgent() throws IOException {
- TestHttpGetMethod method = new TestHttpGetMethod("Mozilla/5.0 (X11; U; Linux
x86_64; th-TH; rv:1.9.1.3) Gecko/20090914 Slackware/13.0_stable Firefox/3.5.3");
+ TestHttpGetMethod method = new TestHttpGetMethod(
+ "Mozilla/5.0 (X11; U; Linux x86_64; th-TH; rv:1.9.1.3) Gecko/20090914
Slackware/13.0_stable Firefox/3.5.3");
String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
+ "&utmn=98888444"
+ "&utmhn=jboss.org"
@@ -1223,17 +1276,19 @@
+ "&utmdt=testLinuxSlackwareUserAgent"
+ "&utmfl=1.6.0_20"
+ "&utmr=1.0.0.qualifier"
- + "&utmp=" + new
JBossToolsTestsFocusPoint("testLinuxSlackwareUserAgent").getURI()
+ + "&utmp="
+ + new JBossToolsTestsFocusPoint("testLinuxSlackwareUserAgent").getURI()
+ "&utmac=UA-17645367-1"
+
"&utmcc=__utma%3D999.46667292388397333777722108798936.1284108996025.1284197794025.1284108794025.1%3B%2B__utmz%3D999.1284108794225.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
+ "&gaq=1";
method.request(url);
assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
+ }
+
@Test
public void testLinuxGentooUserAgent() throws IOException {
- TestHttpGetMethod method = new TestHttpGetMethod("Mozilla/5.0 (X11; U; Linux i686;
th-TH; rv:1.9.1.3) Gecko/20090912 Gentoo Firefox/3.5.3 FirePHP/0.3");
+ TestHttpGetMethod method = new TestHttpGetMethod(
+ "Mozilla/5.0 (X11; U; Linux i686; th-TH; rv:1.9.1.3) Gecko/20090912 Gentoo
Firefox/3.5.3 FirePHP/0.3");
String url = "http://www.google-analytics.com/__utm.gif?utmwv=4.7.2"
+ "&utmn=957077444"
+ "&utmhn=jboss.org"
@@ -1244,13 +1299,113 @@
+ "&utmdt=testLinuxGentooUserAgent"
+ "&utmfl=1.6.0_20"
+ "&utmr=1.0.0.qualifier"
- + "&utmp=" + new
JBossToolsTestsFocusPoint("testLinuxGentooUserAgent").getURI()
+ + "&utmp="
+ + new JBossToolsTestsFocusPoint("testLinuxGentooUserAgent").getURI()
+ "&utmac=UA-17645367-1"
+
"&utmcc=__utma%3D999.46667292388397333777722108798936.1284108794025.1284108788442.1284108880025.1%3B%2B__utmz%3D999.1284108794225.1.1.%EF%BF%BFutmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%7Cutmctr%3DVPE-%EF%BF%BF%3B"
+ "&gaq=1";
method.request(url);
assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
+ }
+
+ @Test
+ public void testLinuxSimplifiedGentooUserAgent1() throws IOException {
+ TestHttpGetMethod method = new TestHttpGetMethod(
+ "Mozilla/5.0 (X11; U; Linux i686; th-TH; rv:1.9.1.3) Gecko/20090912 Gentoo
Firefox/3.5.3");
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ + "utmwv=4.7.2"
+ + "&utmn=22172214"
+ + "&utmhn=jboss.org"
+ + "&utmcs=UTF-8"
+ + "&utmsr=1920x1080"
+ + "&utmsc=24-bit"
+ + "&utmul=th-TH"
+ + "&utmdt=testLinuxSimplifiedGentooUserAgent1"
+ + "&utmhid=1087431432"
+ + "&utmp="
+ + new
JBossToolsTestsFocusPoint("testLinuxSimplifiedGentooUserAgent1").getURI()
+ + "&utmac=UA-17645367-1"
+ + "&utmcc="
+ +
"__utma%3D999.44677790471263281282924103927.1282924103925.1282924103925.1282924103925.1%3B%2B"
+ + "__utmb%3D1%3B%2B"
+ + "__utmc%3D1%3B%2B"
+ + "__utmz%3D156030500.1281430767.1.1."
+ + "utmcsr%3D(direct)%7C"
+ + "utmccn%3D(direct)%7C"
+ + "utmcmd%3D(none)%7C"
+ +
+ "utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+ + "&gaq=1";
+ method.request(url);
+ assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ }
+
+ @Test
+ public void testLinuxSimplifiedGentooUserAgent2() throws IOException {
+ TestHttpGetMethod method = new TestHttpGetMethod(
+ "Mozilla/5.0 (X11; U; Linux i686; th-TH; rv:1.9.1.3) Gecko/20090912
Gentoo");
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ + "utmwv=4.7.2"
+ + "&utmn=1517776694"
+ + "&utmhn=jboss.org"
+ + "&utmcs=UTF-8"
+ + "&utmsr=1920x1080"
+ + "&utmsc=24-bit"
+ + "&utmul=th-TH"
+ + "&utmdt=testLinuxSimplifiedGentooUserAgent2"
+ + "&utmhid=1087431432"
+ + "&utmp="
+ + new
JBossToolsTestsFocusPoint("testLinuxSimplifiedGentooUserAgent2").getURI()
+ + "&utmac=UA-17645367-1"
+ + "&utmcc="
+ +
+ "__utma%3D999.3332224690471263281282924103927.1282924103925.1282924103925.1282924103925.1%3B%2B"
+ + "__utmb%3D1%3B%2B"
+ + "__utmc%3D1%3B%2B"
+ + "__utmz%3D156030500.1281430767.1.1."
+ + "utmcsr%3D(direct)%7C"
+ + "utmccn%3D(direct)%7C"
+ + "utmcmd%3D(none)%7C"
+ +
+ "utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+ + "&gaq=1";
+ method.request(url);
+ assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ }
+
+ @Test
+ public void testLinuxSimplifiedGentooUserAgent3() throws IOException {
+ TestHttpGetMethod method = new TestHttpGetMethod(
+ "Mozilla/5.0 (X11; U; Linux i686; th-TH; rv:1.9.1.3) Gentoo");
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ + "utmwv=4.7.2"
+ + "&utmn=66543336546694"
+ + "&utmhn=jboss.org"
+ + "&utmcs=UTF-8"
+ + "&utmsr=1920x1080"
+ + "&utmsc=24-bit"
+ + "&utmul=th-TH"
+ + "&utmdt=testLinuxSimplifiedGentooUserAgent3"
+ + "&utmhid=1087431432"
+ + "&utmp="
+ + new
JBossToolsTestsFocusPoint("testLinuxSimplifiedGentooUserAgent3").getURI()
+ + "&utmac=UA-17645367-1"
+ + "&utmcc="
+ +
+ "__utma%3D999.333222469055434512381282924103927.1282924103925.1282924103925.1282924103925.1%3B%2B"
+ + "__utmb%3D1%3B%2B"
+ + "__utmc%3D1%3B%2B"
+ + "__utmz%3D156030500.1281430767.1.1."
+ + "utmcsr%3D(direct)%7C"
+ + "utmccn%3D(direct)%7C"
+ + "utmcmd%3D(none)%7C"
+ +
+ "utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+ + "&gaq=1";
+ method.request(url);
+ assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+ }
+
protected class TestHttpGetMethod extends HttpGetRequest {
private HttpURLConnection urlConnection;