From 96cb014a6e411647c2da6d343164c87a0c67a724 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 4 Apr 2013 20:39:11 -0300 Subject: [PATCH] Add firefox 20 support. --- .../main/java/com/wisemapping/filter/SupportedUserAgent.java | 1 + .../wisemapping/test/importer/FreeMindImportExportTest.java | 4 ++-- .../test/java/com/wisemapping/test/model/UserAgentTest.java | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java b/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java index 076a9860..e5a6f417 100644 --- a/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java +++ b/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java @@ -46,6 +46,7 @@ public class SupportedUserAgent implements Serializable { final int majorVersion = version != null ? Integer.parseInt(version.getMajorVersion()) : -1; boolean result = browser == Browser.FIREFOX && majorVersion >= 10; + result = result || browser == Browser.FIREFOX2 && majorVersion >= 17; result = result || browser == Browser.IE8 || browser == Browser.IE9; result = result || browser == Browser.IE && majorVersion >= 8; result = result || browser == Browser.OPERA10 && majorVersion >= 11; diff --git a/wise-webapp/src/test/java/com/wisemapping/test/importer/FreeMindImportExportTest.java b/wise-webapp/src/test/java/com/wisemapping/test/importer/FreeMindImportExportTest.java index 92841fcb..8ae36b3f 100644 --- a/wise-webapp/src/test/java/com/wisemapping/test/importer/FreeMindImportExportTest.java +++ b/wise-webapp/src/test/java/com/wisemapping/test/importer/FreeMindImportExportTest.java @@ -16,13 +16,13 @@ import org.testng.annotations.Test; import java.io.*; @Test -public class FreemindImportExportTest { +public class FreeMindImportExportTest { private static final String DATA_DIR_PATH = "src/test/resources/data/freemind/"; private static final String UTF_8 = "UTF-8"; final private Importer importer; final private FreemindExporter exporter; - public FreemindImportExportTest() throws ImporterException { + public FreeMindImportExportTest() throws ImporterException { ImporterFactory exporterFactory = ImporterFactory.getInstance(); importer = exporterFactory.getImporter(ImportFormat.FREEMIND); exporter = new FreemindExporter(); diff --git a/wise-webapp/src/test/java/com/wisemapping/test/model/UserAgentTest.java b/wise-webapp/src/test/java/com/wisemapping/test/model/UserAgentTest.java index 6333f4f5..c0f61043 100644 --- a/wise-webapp/src/test/java/com/wisemapping/test/model/UserAgentTest.java +++ b/wise-webapp/src/test/java/com/wisemapping/test/model/UserAgentTest.java @@ -49,6 +49,8 @@ public class UserAgentTest { final SupportedUserAgent mediapartners = SupportedUserAgent.create("Mediapartners-Google/2.1"); Assert.assertEquals(mediapartners.isBrowserSupported(), true); + final SupportedUserAgent firefox20 = SupportedUserAgent.create("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20121215 Firefox/20.0 AppEngine-Google; (+http://code.google.com/appengine; appid: slubuntuk)"); + Assert.assertEquals(firefox20.isBrowserSupported(), true); }