summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis <denis@vaadin.com>2017-01-25 14:34:38 +0200
committerHenri Sara <henri.sara@gmail.com>2017-01-25 14:34:38 +0200
commit23139cf0196e3120535452e7197627be4fb41fec (patch)
treeb110f9fbc63a089543f4693e94e5315524b18755
parent294ca0a2f5c29b65f9c4dc5887bfa0abc1cb7c7f (diff)
downloadvaadin-framework-23139cf0196e3120535452e7197627be4fb41fec.tar.gz
vaadin-framework-23139cf0196e3120535452e7197627be4fb41fec.zip
Show unsupported browser page for FF version less than 45. (#8328)
Fixes vaadin/framework8-issues#569
-rw-r--r--client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/VBrowserDetails.java2
2 files changed, 11 insertions, 1 deletions
diff --git a/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java b/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java
index 45e805e781..cef4f6a5d6 100644
--- a/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java
+++ b/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java
@@ -20,6 +20,7 @@ public class VBrowserDetailsUserAgentParserTest {
private static final String FIREFOX_30B5_MAC = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5";
private static final String FIREFOX_40B7_WIN = "Mozilla/5.0 (Windows NT 5.1; rv:2.0b7) Gecko/20100101 Firefox/4.0b7";
private static final String FIREFOX_40B11_WIN = "Mozilla/5.0 (Windows NT 5.1; rv:2.0b11) Gecko/20100101 Firefox/4.0b11";
+ private static final String FIREFOX_SUPPORTED = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Firefox/45.0";
private static final String KONQUEROR_LINUX = "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Exabot-Thumbnails)";
private static final String IE11_WINDOWS_7 = "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; rv:11.0) like Gecko";
@@ -373,6 +374,15 @@ public class VBrowserDetailsUserAgentParserTest {
assertMacOSX(bd);
}
+ @Test
+ public void checkFFsupportedVersions() {
+ VBrowserDetails details = new VBrowserDetails(FIREFOX_40B11_WIN);
+ Assert.assertTrue(details.isTooOldToFunctionProperly());
+
+ details = new VBrowserDetails(FIREFOX_SUPPORTED);
+ Assert.assertFalse(details.isTooOldToFunctionProperly());
+ }
+
/*
* Helper methods below
*/
diff --git a/shared/src/main/java/com/vaadin/shared/VBrowserDetails.java b/shared/src/main/java/com/vaadin/shared/VBrowserDetails.java
index 9fc0d072c8..2b6018f314 100644
--- a/shared/src/main/java/com/vaadin/shared/VBrowserDetails.java
+++ b/shared/src/main/java/com/vaadin/shared/VBrowserDetails.java
@@ -573,7 +573,7 @@ public class VBrowserDetails implements Serializable {
if (isSafari() && getBrowserEngineVersion() < 533) {
return true;
}
- if (isFirefox() && getBrowserMajorVersion() < 4) {
+ if (isFirefox() && getBrowserMajorVersion() < 45) {
return true;
}
if (isOpera() && getBrowserMajorVersion() < 11) {