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 2012/02/17 16:26:18 UTC
svn commit: r1245607 - 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 Feb 17 15:26:18 2012
New Revision: 1245607
URL: http://svn.apache.org/viewvc?rev=1245607&view=rev
Log:
Adding IE 10 to known user agents
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=1245607&r1=1245606&r2=1245607&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 Feb 17 15:26:18 2012
@@ -65,6 +65,8 @@ public class UserAgent implements Serial
public static final UserAgent MSIE_9_0 = new UserAgent("msie", "9_0", EnumSet.of(Capability.CONTENT_TYPE_XHTML));
+ public static final UserAgent MSIE_10_0 = new UserAgent("msie", "10_0", EnumSet.of(Capability.CONTENT_TYPE_XHTML));
+
/**
* @deprecated no longer supported, since Tobago 1.5
*/
@@ -236,6 +238,8 @@ public class UserAgent implements Serial
return MSIE_8_0;
} else if (header.contains("MSIE 9.0")) {
return MSIE_9_0;
+ } else if (header.contains("MSIE 10.0")) {
+ return MSIE_10_0;
} else {
return MSIE;
}
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=1245607&r1=1245606&r2=1245607&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 Feb 17 15:26:18 2012
@@ -80,6 +80,14 @@ public class UserAgentUnitTest {
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Win64; x64; Trident/5.0; "
+ ".NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)"},
+ {"Internet Explorer 10 - Windows 8 - Developer Preview",
+ UserAgent.MSIE_10_0,
+ "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)"},
+
+ {"Internet Explorer 10 - Compatibility Mode - Windows 8 - Developer Preview",
+ UserAgent.MSIE_7_0_COMPAT,
+ "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C)"},
+
{"Firefox 3.6 - Ubuntu 10.4",
UserAgent.GECKO_1_9,
"Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2) Gecko/20100308 Ubuntu/10.04 (lucid) Firefox/3.6"},