myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1700748 - in /myfaces/tobago/branches/tobago-3.0.x/tobago-core/src: main/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtils.java test/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtilsUnitTest.java
Date Wed, 02 Sep 2015 09:54:38 GMT
Author: lofwyr
Date: Wed Sep  2 09:54:37 2015
New Revision: 1700748

URL: http://svn.apache.org/r1700748
Log:
TOBAGO-1368: Create a new theme which uses Bootstrap - Mime Type support for "eot" fonts

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtils.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtilsUnitTest.java

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtils.java?rev=1700748&r1=1700747&r2=1700748&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtils.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtils.java
Wed Sep  2 09:54:37 2015
@@ -65,6 +65,9 @@ public final class MimeTypeUtils {
         if (file.endsWith("ttf")) {
           return "application/x-font-ttf";
         }
+        if (file.endsWith("eot")) {
+          return "application/vnd.ms-fontobject";
+        }
       }
     } else if (file.charAt(length - 3) == '.') {
       if (file.endsWith("js")) {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtilsUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtilsUnitTest.java?rev=1700748&r1=1700747&r2=1700748&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtilsUnitTest.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/util/MimeTypeUtilsUnitTest.java
Wed Sep  2 09:54:37 2015
@@ -37,6 +37,7 @@ public class MimeTypeUtilsUnitTest exten
   public static final String WOFF = "http:///localhost:8080/demo/demo.woff";
   public static final String WOFF2 = "http:///localhost:8080/demo/demo.woff2";
   public static final String TTF = "http:///localhost:8080/demo/demo.ttf";
+  public static final String EOT = "http:///localhost:8080/demo/demo.eot";
   public static final String SVG = "http:///localhost:8080/demo/demo.svg";
   public static final String ODT = "http:///localhost:8080/demo/demo.odt";
 
@@ -62,6 +63,7 @@ public class MimeTypeUtilsUnitTest exten
     Assert.assertEquals("application/font-woff", MimeTypeUtils.getMimeTypeForFile(WOFF));
     Assert.assertEquals("application/font-woff2", MimeTypeUtils.getMimeTypeForFile(WOFF2));
     Assert.assertEquals("application/x-font-ttf", MimeTypeUtils.getMimeTypeForFile(TTF));
+    Assert.assertEquals("application/vnd.ms-fontobject", MimeTypeUtils.getMimeTypeForFile(EOT));
     Assert.assertEquals("image/svg+xml", MimeTypeUtils.getMimeTypeForFile(SVG));
   }
 



Mime
View raw message