You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2011/06/24 16:07:34 UTC

svn commit: r1139310 - in /myfaces/tobago/trunk/tobago-core/src: main/java/org/apache/myfaces/tobago/context/UserAgent.java test/java/org/apache/myfaces/tobago/context/UserAgentUnitTest.java

Author: lofwyr
Date: Fri Jun 24 14:07:34 2011
New Revision: 1139310

URL: http://svn.apache.org/viewvc?rev=1139310&view=rev
Log:
adding Firefox 5

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/UserAgent.java
    myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/UserAgentUnitTest.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/UserAgent.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/UserAgent.java?rev=1139310&r1=1139309&r2=1139310&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/UserAgent.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/UserAgent.java Fri Jun 24 14:07:34 2011
@@ -149,6 +149,12 @@ public class UserAgent implements Serial
       = new UserAgent("gecko", "2_0", EnumSet.of(Capability.PLACEHOLDER, Capability.CONTENT_TYPE_XHTML));
 
   /**
+   * e. g. Firefox 5.0
+   */
+  public static final UserAgent GECKO_5_0
+      = new UserAgent("gecko", "5_0", EnumSet.of(Capability.PLACEHOLDER, Capability.CONTENT_TYPE_XHTML));
+
+  /**
    * e. g. Safari 4, Safari 5, Chrome
    */
   public static final UserAgent WEBKIT
@@ -235,6 +241,8 @@ public class UserAgent implements Serial
         return GECKO_1_9;
       } else if (header.contains("rv:2.0")) {
         return GECKO_2_0;
+      } else if (header.contains("rv:5.0")) {
+        return GECKO_5_0;
       } else {
         return GECKO;
       }

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/UserAgentUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/UserAgentUnitTest.java?rev=1139310&r1=1139309&r2=1139310&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/UserAgentUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/UserAgentUnitTest.java Fri Jun 24 14:07:34 2011
@@ -76,6 +76,10 @@ public class UserAgentUnitTest {
             "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3pre) Gecko/20100328 Ubuntu/9.10 (karmic) "
                 + "Namoroka/3.6.3pre"},
 
+        {"Firefox 5.0 - Mac OS X Snow Leopard",
+            UserAgent.GECKO_5_0,
+            "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20100101 Firefox/5.0"},
+
         {"Firefox 4.0 beta 2 - Mac OS X Snow Leopard",
             UserAgent.GECKO_2_0,
             "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b2) Gecko/20100720 Firefox/4.0b2"},